1.2 Get Token
The Get Token endpoint facilitates the processing of a given token, subsequently returning a new token for the user. The provided user token is decoded to ascertain the user's identity.
Method: POST
Endpoint
Parameters (Query String):
token (str): The JWT (JSON Web Token) received from the user. This token is used to authenticate the user and perform the required operations.
Return Value:
token (str): The newly created or updated user token.
Functionality:
decodeJWT(token): Decodes the provided token to determine the user's identity.
get_token(token): Performs the necessary operations using the provided token to create or update the token.
The endpoint returns the new token in JSON format.
If an exception occurs during the token creation or update process:
Logs the error in the API usage history.
Raises an HTTP 400 exception with the error message.
Params:
token
api_key
Example Request:
Example Response:
Example Error Response:
This endpoint allows users to receive a new or updated token based on an existing JWT. It validates the user's token, processes the token update, and returns the new token. If an error occurs during the token creation or update process, an appropriate error message is returned.
Last updated