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,
)