Exchange API Key for a JWT
This API is used to exchange a valid API key and tenant information for a JWT that can be used to access protected TAKAKRYPT APIs.
Endpoint Details
| URL | /v1/auth/token |
| Method | POST |
| Authorization | Bearer Token |
Request Body
Use the following format to make a request:
JSON Request
{
"user_key": "uk_a4507844f1753c2333edd1eaf34d2b174372e3bce08818f1",
"tenant": "default"
}
Parameters
| Parameter | Type | Description |
|---|---|---|
| user_key | String | User key used for authentication |
| tenant | String | Name of the tenant associated with the API key |
Response
Here is an example response after the request has been successfully processed:
Response
{
"token": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiIwYTkzN2M2MC0wZWQ0LTRkMDYtODcwYS0yZTI4NGI1NDI4N2QiLCJlbWFpbCI6ImplcnJ5QHByaW1hc3lzLmNvLmlkIiwidGVuYW50IjoiNWViZGUxN2MtMDFhMS00Mzk0LTk3N2ItOWU2MTEyNTBjZjVkIiwidGVuYW50X25hbWUiOiJEZWZhdWx0Iiwicm9sZSI6InN1cGVyYWRtaW4iLCJmdWxsbmFtZSI6IkFkbWluIEFwbGlrYXNpIiwiYWN0aXZlIjp0cnVlLCJncm91cHMiOlt7ImdpZCI6IjgxYWQ0ZDA1LWQxMWEtNDgwOS1iMWYyLWNjMDAwYzA4NjczMCIsImduYW1lIjoiR3JvdXAgSmVqZSIsInB0eXBlIjoiQURNSU4iLCJwaWQiOiIifV0sInN1YiI6IjBhOTM3YzYwLTBlZDQtNGQwNi04NzBhLTJlMjg0YjU0Mjg3ZCIsImV4cCI6MTc4MjEyNjg0NywiaWF0IjoxNzgyMTIzMjQ3fQ.WmoXHHQRzoT1z_XgDtDC-MMmjBHJxQdpspI9VIRj4GgfvOXbdvcNQKipRy5Cf8-vcwtkCyVP6gvSzkVfl3QuAw",
"expires_at": 1782126847
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
| token | String | JWT used to authenticate subsequent API requests |
| expires_at | Integer | Token expiration time in Unix timestamp format |
info
- The value used in the
Authorizationis theauth_token, a separate access token used to authorize this token-exchange request. - The token expires at the Unix timestamp specified in the
expires_atfield. - A new token must be requested after expiration.
- Unix timestamp fields can be converted to a human-readable date and time format as needed.