Generate Refresh Token

Before we move on to configuring the function and client components, we must first generate the Refresh Token to include in the function code.

As mentioned earlier, you can use a REST API client tool of your choice for this purpose. In this tutorial, we will explain this step using the Postman API platform.

Access your API client tool and create a new request. You must send the request to the following URL, using the specified HTTP method:

  • Request URL:

  • Request Method: POST

You must include the following keys and values as the query params in the request:

  • code: The Grant Token or the value of code obtained during the client registration in the API console
  • client_id: The Client ID that was generated during the client registration
  • client_secret: The Client Secret that was generated during the client registration
  • grant_type: authorization_code (Provide this literal string as the value)

Send the request with these parameters to the specified request URL. If the request is successfully processed, the API client will return a response containing these values: access_token, refresh_token, api_domain, token_type, expires_in. We only require the Refresh Token.

A screenshot of the Postman API platform is shown below with the request sent and the response received.


Copy the refresh_token value from the response received. You will need to paste this into the function files in the next step.

Last Updated 2023-12-15 18:54:08 +0530 +0530