apidocs icon indicating copy to clipboard operation
apidocs copied to clipboard

access_token not working

Open grippo opened this issue 7 years ago • 0 comments

I'm trying to make curl (bash) request to https://api.thegrid.io

I've already got an access token, walking thru the procedure: open

https://passport.thegrid.io/login/authorize/google?client_id=CLIENT_ID&response_type=code&scope=share,content_management,website_management&redirect_uri=REDIRECT_URI.

That gave me a code. Then

curl --data-urlencode "client_id=CLIENT_ID" --data-urlencode "client_secret=CLIENT_SECRET" --data-urlencode "code=CODE" --data-urlencode "grant_type=authorization_code" -X POST https://passport.thegrid.io/login/authorize/token

That gave me an access_token and a refresh_token.

Now I make an updates GET request, like this

curl -H "Authorization: Bearer ACCESS_TOKEN" -H "Content-Type: application/json" https://api.thegrid.io/updates

and it give me Unauthorized. I'm missing something but can't figure it out. Any help? TIA

Jorge

grippo avatar Jul 05 '17 15:07 grippo