pystagram.graph_api.endpoints.oauth.access_token package — pystagram 0.1 documentation

# pystagram.graph_api.endpoints.oauth.access_token package

## Submodules

## pystagram.graph_api.endpoints.oauth.access_token.access_token module

class pystagram.graph_api.endpoints.oauth.access_token.access_token.AccessToken(oauth: Oauth)

  Bases: `object`

  The AccessToken endpoint of the Instagram Graph API.

  Parameters:

    oauth (`Oauth`) – An instance of the `Oauth` class.

  get(grant_type: str | None = 'fb_exchange_token', client_id: int | None = None, client_secret: str | None = None, fb_exchange_token: str | None = None)

    Gets a Long-Lived User Access Token. Gets a long-lived user access token from a short-lived user access token.

    Parameters:

      - grant_type (str, optional) – The type of grant to request, defaults to “fb_exchange_token”

      - client_id (int, optional) – The app ID of the Instagram app, inferred from the InstagramGraphApi instance if None, defaults to None

      - client_secret (str, optional) – The app secret of the Instagram app, inferred from the InstagramGraphApi instance if None, defaults to None

      - fb_exchange_token (str, optional) – The short-lived user access token, inferred from the InstagramGraphApi instance if None, defaults to None

    Returns:

      The response from the GET /oauth/access_token endpoint.

    Return type:

      `pystagram.helpers.api_client.api_response.InstagramApiResponse`

## Module contents