API Reference

Token Generation

This API endpoint is designed to create a JWT token for an access key with a millisecond-level expiry time. The token generated will have a precise expiry time based on the specified milliseconds.

  • Users have the ability to create a JWT token specifically for a particular access key. This allows for the provision of temporary access to the database without the need to share the access key and secret information with others. By generating a JWT token, users can provide temporary access to authorized parties while keeping the access key and secret secure.
  • The JWT token generated will have the same level of access as the access key used to create the token. The permissions associated with the access key will be reflected in the JWT token, allowing the bearer of the token to access the corresponding resources and perform actions at the same level as the original access key.
  • To create a JWT token with a specific expiry time, you need to pass the expiry time in milliseconds as a query parameter. For example, if you want to create a token with a 1-hour expiry, you would pass the expiry value as 3600000 (which is 60 minutes multiplied by 60 seconds multiplied by 1000 milliseconds).
  • The JSON response from this API endpoint will include the newly created JWT token with the specified expiry time. This token can be used for authentication and will remain valid until it expires. It is important to handle and store this token securely as it grants temporary access to the designated resources.
  • By including the access token in the "Authorization" header with the "Bearer" scheme, you can authenticate and authorize your requests to other API endpoints that require authentication.
  • The Master access key has access to this endpoint, allowing it to generate tokens for any access key in the NexusRunDB database. On the other hand, user-generated access keys can only generate tokens for themselves. This means that each user-generated access key can create a token specifically for its own access and permissions, while the Master access key has the ability to generate tokens for any access key in the system.
  • The Token (Bearer authentication) cannot be used to access this endpoint.
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!