Skip to content
This repository was archived by the owner on Jul 1, 2026. It is now read-only.
This repository was archived by the owner on Jul 1, 2026. It is now read-only.

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

Description

@ronnievdc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions