Skip to main content
POST
Intercambiar la clave API por un token JWT

Authorizations

Authorization
string
header
required

Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.

Headers

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Body

application/json
audience
string<uri>
required

Reclamación de audiencia (aud) del JWT para el token intercambiado. Establezca esto en la URL de la API/servicio objetivo que debe aceptar el token.

externalUserId
string
required

Su identificador de usuario externo para colocar en el reclamo de sujeto (sub) del JWT. Debe ser de 1 a 150 caracteres imprimibles en ASCII y no puede ser el carácter comodín *.

Required string length: 1 - 150
Pattern: ^[\x20-\x7E]+$
expiresIn
number
default:3600

Tiempo de vida del token en segundos. Debe estar entre 300 (5 minutos) y 2592000 (30 días). Por defecto es 3600 (1 hora).

Required range: 300 <= x <= 2592000
permissions
string[]

Conjunto opcional de permisos de clave API para incrustar en el token. Si se omite, se utilizan todos los permisos de clave API.

Response

Intercambio exitoso de la clave API por un token JWT

token
string
required

Signed JWT exchange token to use when calling downstream services.