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

fetch_access_data does a get instead of post which results in a HTTP 400 Bad Request #29

Open
ronnievdc opened this issue Mar 25, 2016 · 1 comment

Comments

@ronnievdc
Copy link

When trying to receive an access_token from the code received via response_url. The yampy module responds with HTTP 400 Bad Request

How to reproduce

import yampy
code = request.GET['code']
authenticator = yampy.Authenticator(
    client_id='MY_KEY',
    client_secret='MY_SECRET'
)
access_token = authenticator.fetch_access_token(code)

How to fix

Use post instead of get
https://developer.yammer.com/docs/oauth-2

def fetch_access_data(self, code):
    [...]
    return client.post(
        path="/access_token",
        client_id=self._client_id,
        client_secret=self._client_secret,
        code=code,
    )
@bru65pag
Copy link

post instead of get does not solve the issue on my computer :-(

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

2 participants