Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

access_token not working #97

Open
grippo opened this issue Jul 5, 2017 · 0 comments
Open

access_token not working #97

grippo opened this issue Jul 5, 2017 · 0 comments

Comments

@grippo
Copy link

grippo commented Jul 5, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant