Linkedin 401 "Unknown authentication scheme" Javascript SDK Auth - linkedin

1 of every 4 times we try to log in via the LinkedIn API we receive the following error.
It is quite strange because after we refresh the browser and run the auth call again it works. Any ideas?
{
"errorCode": 0,
"message": "Unknown authentication scheme",
"requestId": "9VFCEA1OLH",
"status": 401,
"timestamp": 1523873487174
}
Image

Related

LinkedIn API rest/shares ACCESS_DENIED. Not enough permissions to access: sharesV2.FINDER-owners

I'm getting the below error message when using the Linkedin-Version 202212. Also, it doesn't work with 202301. However, using 202211 is fine without any issue.
API EndPoint: https://api.linkedin.com/rest/shares
"status": 403,
"serviceErrorCode": 100,
"code": "ACCESS_DENIED",
"message": "Not enough permissions to access: sharesV2.FINDER-owners.20221201"

Linkedin company page post not working via linkedin API

Authentication and profile post posting working well when post in company page give below error
Response: 500 Internal Server Error
{
"errorCode": 0,
"message": "Internal service error",
"requestId": "DBF51M03PY",
"status": 500,
"timestamp": 1532353548757
}
is there any change in API? Anyone face same issue? Same code working 2-3 days ago.
https://api.linkedin.com/v1/companies/" + companyPageId + "/shares?format=json

Google Analytics Reporting API v4 Fatal Error upon reauthentication

I am following this example: https://developers.google.com/analytics/devguides/reporting/core/v3/quickstart/web-php
After the auth token expires, I get this error:
Fatal error: Uncaught Google_Service_Exception: { "error": { "code": 401, "message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", "errors": [ { "message": "Request had invalid authentication credentials.", "reason": "authError" } ], "status": "UNAUTHENTICATED" } } in /Users/stephenbarrett/Reporting/src/Google/Http/REST.php:118 Stack trace: #0 /Users/stephenbarrett/Reporting/src/Google/Http/REST.php(94): Google_Http_REST::decodeHttpResponse(Object(GuzzleHttp\Psr7\Response), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...') #1 /Users/stephenbarrett/Reporting/src/Google/Task/Runner.php(176): Google_Http_REST::doExecute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...') #2 /Users/stephenbarrett/Reporting/src/Google/Http/REST.php(58): Google_Task_Runner->run() #3 /Users/steph in /Users/stephenbarrett/Reporting/src/Google/Http/REST.php on line 118
I went back to the basics and just used the same from the quickstart documentation and I got the same error after the Auth Token expired (1 hour). I'm using the PHP solution. And I noticed that there is an IF statement stating that the Auth Token doesn't exist get the oAuth2callback file, but it's not redirecting to the file at all. I have to manually enter in the oAuth2callback.php in the url and then I am able to renew my Auth Token. I'm just wondering why the IF statement is not working when using their sample code. Any help is greatly appreciated.
UPDATE
I figured it out. I added another if statement to check the timestamp against the current timestamp to make it refresh the Auth Token
1) Register your application in the Google Developers Console
2) Authorize access to Google Analytics data.
3) Create an Analytics service object
please refer the following url:
Google Analytics API Returning 401 On Example Code

How to authenticate WooCommerce REST API

I have generated the consumer key and consumer secret but I don't know how to aply it to authenticate on Postman. This is the screenshot below:
The url looks like this: https://mystore.com/wp-json/wc/v1/coupons?oauth_consumer_key=ck_XXXXXXXXXXXXXXX&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1471440398&oauth_nonce=Qaq8cK&oauth_version=1.0&oauth_signature=XXXXXXXXXXXXXXXXXXXXXXXXXw=
But this is returning error 401:
{
"code": "woocommerce_rest_cannot_view",
"message": "Sorry, you cannot list resources.",
"data": {
"status": 401
}
}
I have read the the documentation but it didn't show any examples.
You can send your credentials via Authentication header if your site runs on HTTPS (it should if you're running WooCommerce).
Here's the relevant part of the docs:
https://woothemes.github.io/woocommerce-rest-api-docs/?shell#authentication-over-https

linkedin API company stats internal server error

I recieved an error from Linkedin API /company-statistics.
I was using apigee console, launching this API https://api.linkedin.com/v1/companies/2414183/company-statistics?format=json. and I get the following response:
{
"errorCode": 0,
"message": "Internal service error",
"requestId": "3D4B9V007S",
"status": 500,
"timestamp": 1464778594404
}
Plesa advise as soon as possible
I answered this question here.
This error seems to be related to the "test" company with id
"2414183".
I had the same issue but when i used the same command with my company
ID, I received a well formed JSON in response with all statistics.

Resources