# Generate Token **POST /oauth/token** This endpoint is used to generate refresh token using parameters client_id, code and client_secret. If Grant type is "authorization_code" then request body must have two mandatory parameters, called "code" and "redirect_uri". While generating new access token on expiry, request body must have grant type as "refresh_token" and mandatory parameter called "refresh_token". ## Servers - https://openapi.niftypm.com: https://openapi.niftypm.com () ## Parameters ### Headers - **authorization** (string) The string Basic with your Client ID and Client Secret separated with colon (:), Base64-encoded. For example, Client_ID:Client_Secret Base64-encoded is Q2xpZW50X0lEOkNsaWVudF9TZWNyZXQ=. ### Body: application/json (object) - **code** (string) Code will be come from the authorize url call back redirect url. - **refresh_token** (string) Refresh Token - **grant_type** (string) grant_type - **redirect_uri** (string) Redirect URI ## Responses ### 201 Generate required refresh and access tokens. #### Body: application/json (object) - **access_token** (string) Access Token - **token_type** (string) Token Type - **refresh_token** (string) Refresh token - **expires_in** (number) Expires in seconds - **scope** (string) Scope ### 401 The client request has not been completed because it lacks valid authentication credentials for the requested resource. ### 403 The client does not have access rights to the content. ### 405 The request method is known by the server but is not supported by the target resource. [Powered by Bump.sh](https://bump.sh)