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 request returns 400 error using Instagram provider #15

Open
jahvi opened this issue Apr 5, 2012 · 2 comments
Open

Access token request returns 400 error using Instagram provider #15

jahvi opened this issue Apr 5, 2012 · 2 comments

Comments

@jahvi
Copy link

jahvi commented Apr 5, 2012

I just tried using the Instagram provider to authenticate users in my app and for te most part it works out fine, however when after users grant access to my app and I try to run:

$token = $provider->access($_GET['code']);

I get a 400 Request error, I tried doing the same request via CURL like it says in the Instagram docs:

curl \
    -F 'client_id=CLIENT-ID' \
    -F 'client_secret=CLIENT-SECRET' \
    -F 'grant_type=authorization_code' \
    -F 'redirect_uri=YOUR-REDIRECT-URI' \
    -F 'code=CODE' \
    https://api.instagram.com/oauth/access_token

And it returns the access_token just fine so could it be a problem in how the POST request is beign handled?

Thanks in advance!

@philsturgeon
Copy link
Owner

Try switchthing the method from GET to POST in the provider and see what happens.

@pangguoming
Copy link

i get the same error, i think you call api too frequently

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

3 participants