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. :param oauth: An instance of the
Oauth
class. :type oauth:Oauth
- 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. :param grant_type: The type of grant to request, defaults to “fb_exchange_token” :type grant_type: str, optional :param client_id: The app ID of the Instagram app, inferred from the InstagramGraphApi instance if None, defaults to None :type client_id: int, optional :param client_secret: The app secret of the Instagram app, inferred from the InstagramGraphApi instance if None, defaults to None :type client_secret: str, optional :param fb_exchange_token: The short-lived user access token, inferred from the InstagramGraphApi instance if None, defaults to None :type fb_exchange_token: str, optional :return: The response from the GET /oauth/access_token endpoint. :rtype:
pystagram.helpers.api_client.api_response.PystagramApiResponse