Can't refresh access token for Sonos - sonos

When trying to refresh the access token when it expires, had an error:
Access Denied
You don't have permission to access "http://api.sonos.com/auth/oauth/v2/access" on this server.
Reference #18.cc5e0e17.1539959683.3844201.
Using request from Sonos API reference: https://developer.sonos.com/reference/authorization-api/refresh-token/
Authorization the same as in "Create token" request, and it works. And refresh token is from responce to "Create token" request

It looks like you've got the wrong URL. The path should be /login/v3/oauth/access. We did have a mistake in our documentation which likely led to your error.

Related

Can't access Quay API

I am trying to retrieve information from Quay's API.
I have already generated "application token" in Quay by clicking on "Create Application Token".
Then I try to get information from any endpoint using the header Authorization: Bearer <TOKEN>, but I am always getting a 401 response.
Am I missing any step? Am I doing something wrong?

403 Invalid scope claims/roles

I've seen this question asked before, but I'm reproducing all the steps and at loss of where the issue is.
I have an app in Graph with requested app permission Reports.Read.All
(Admin). No other permissions requested.
The admin has authorised this app (client credentials flow)
I'm getting a token via client credentials flow
However, any API call
to the Reports results in 403 Invalid scope claims/roles (e.g.
https://graph.microsoft.com/v1.0/reports/getEmailActivityUserCounts(period='D7') with Authorization: Bearer token)
When I'm decoding the token, it has no reference to the scope whatsoever.
What am I doing wrong?
Resolved: I needed to register the app with Azure AD and not Graph.

eBay API request error: 'Invalid access token. Check the value of the Authorization HTTP request header.'

I've registered as a developer with eBay and created an app.
I generated an Oauth (not Auth'n'Auth)
Using Postman to generate a simple request (image) and recieving an error for token invalidity
Error: Invalid access token. Check the value of the Authorization HTTP request header.
What am I doing wrong here?
If your token is for "sandbox" environment, make sure you use sandbox API endpoints for your requests as well.
Instead of https://api.ebay.com/buy/browse/v1/...,
try https://api.sandbox.ebay.com/buy/browse/v1/....
One of the issues which might have happened is:
The access token might have expired
Use the refresh token to refresh the access token when it expires — you know when to do this when your call to the API returns a status code of 401 and the above body you saw in Postman.

Linkedin oauth2 get user profile from access token

I am getting error of Unknown authentication scheme. My request url is
http://api.linkedin.com/v1/people/~?header=Authorization%3A+Bearer+MY ACCESS TOKEN%0D%0Ax-li-format%3A+json%0D%0A
Please tell me where I am wrong. My scope is same in files and dev account
The header value with your Authorization + bearer token is not meant to be passed as a URL parameter, it's meant to be included as an actual HTTP header in your request.
Same goes for the x-li-format.

Getting Invalid Authsub Token Error 403

I am trying to authenticate my application using Blogger API but when user grant access to the application and blogger api return the token and the token i use to exchange the by sending the request on https://www.google.com/accounts/AuthSubSessionToken it return an error called Error 403 Invalid AuthSub Token. Kindly help me in this regard to debug the problem and solve it. Thanks in Advance
after doing some experiment, here it is some advice :
change secure to zero
https://www.google.com/accounts/AuthSubRequest?scope=https://gdata.youtube.com&session=1&secure=0&next=http://www.example.com
make sure you are requesting from http for and request in http again in future
https://www.google.com/accounts/AuthSubRequest?scope=http://gdata.youtube.com&session=1&secure=0&next=http://www.example.com
it's worked like a charm for me...