Exchanges the user authentication code to JWT (
This method can be used in the following scripts:
- To exchange the user authentication code to JWT,
- To refresh the JWT when it is expired if your application needs access to Login API beyond the JWT expiration period. Works only if
scope=offlinein the registration or authentication method.
refresh_tokenreceived in the response of the first script are required.
- To get the server JWT without user participation,
refresh_token value received in the response to the last call of this method. Required if
grant_type is ‘refresh_token’.
The type of getting the JWT. Can be:
authorization_codeto exchange the code received in the method to JWT. The
codevalue must be specified.
refresh_tokento get the refreshed JWT when the previous value is expired. The
refresh_tokenvalue must be specified.
client_credentialsto get the server JWT without user participation, the
client_secretvalues must be specified.
Your secret key hashed according to the bcrypt algorithm. You got it after sending the request to enable OAuth 2.0. To get your secret key again, please contact your Account Manager.
Your application ID. You will get it after sending the request to enable the OAuth 2.0 protocol. To get your application ID again, please contact your Account Manager.
URL to redirect the user to after account confirmation, successful authentication or password reset confirmation. To set up this parameter, please contact your Account Manager.
User authentication code that will be exchanged to a JWT. Required if
grant_type is ‘authorization_code’.
JWT expiration period in seconds. You can configure it in Publisher Account > your Login project > General settings > JWT expiration.
Refresh the token for updating the
JWT type. Can be ‘bearer’.