You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example is not working because the accessToken is invalid for the /profiles request.
This causes the 401 response from the Buffer API.
A possible explanation is that https://api.bufferapp.com/1/oauth2/token.json returns an API token with inadequate scopes. Or the OAuth lib has been configured incorrectly.
Steps to reproduce
Create a new Buffer app with the redirect url: http://127.0.0.1:9999/oauth/callback
2019/01/08 00:21:50 You will now be taken to your browser for authentication
2019/01/08 00:21:52 Authentication URL: https://bufferapp.com/oauth2/authorize?access_type=online&client_id=5c32a3174b1be71532161683&redirect_uri=http%3A%2F%2F127.0.0.1%3A9999%2Foauth%2Fcallback&response_type=code&state=state
2019/01/08 00:21:54 code: 1/758a743876aed......
2019/01/08 00:21:55 Token: &{1/3ddd71...... 0001-01-01 00:00:00 +0000 UTC map[access_token:1/3ddd7.......scope:<nil>]}
2019/01/08 00:21:55 Authentication successful
2019/01/08 00:21:55 Invalid request. Status code was 401
Performed request
Here is the curl representation of the request that the go-buffer lib has executed
curl -X GET \
https://api.bufferapp.com/1/profiles.json \
-H 'authorization: Bearer 1/3ddd71......' \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded'
Response:
{
"error": "The provided access token is invalid",
"code": 401
}
Expected behavior
/profiles should return 200 as status code
/profiles should return the profiles for the user
The text was updated successfully, but these errors were encountered:
Got response from Buffer Team.
There is a need to reproduce this problem without any library. For example, create a more general approach to reproduce this issue. E.g. a bash script with curl commands.
The example is not working because the accessToken is invalid for the /profiles request.
This causes the 401 response from the Buffer API.
A possible explanation is that
https://api.bufferapp.com/1/oauth2/token.json
returns an API token with inadequate scopes. Or the OAuth lib has been configured incorrectly.Steps to reproduce
http://127.0.0.1:9999/oauth/callback
./go-buffer -clientId <YourClientId> -clientSecret <YourClientSecret>
Used tools
go version go1.11.1 darwin/amd64
golang.org/x/oauth2
Output
Performed request
Here is the curl representation of the request that the go-buffer lib has executed
Expected behavior
The text was updated successfully, but these errors were encountered: