Skip to main content
⚠️ Archived Version: This documentation is for an outdated version. Please visit the latest version.

Authenticate a user

POST 

/jwt/authenticate/:user_id

Use this endpoint to get JWT tokens to authenticate a user with the Nabla API. These tokens only gives access to resources for the specified user. This endpoint should typically be called by your backend on behalf of an authenticated user, and the resulting JWT tokens should be forwarded to the user's frontend securely.

Request

Path Parameters

    user_id uuidrequired

    The unique identifier of the user.

Responses

Schema
    access_tokenjwt_token (string)required

    A (typically) short-lived JWT token used to access authenticated resources, e.g. the Nabla User API.

    Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiMTIzNDU2Nzg5MCIsIm5hbWUiOiJKb2huIERvZSIsImlhdCI6MTUxNjIzOTAyMn0.v5qdy8w9Ygs5fdic9a1LuX76PUdx3omYd5GlDTAF3Ug
    refresh_tokenjwt_token (string)required

    A (typically) long-lived JWT token allowing you to "refresh" your access to resources (i.e. extend your session, returning a fresh access token and a new refresh token with a later expiration).

    Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiMTIzNDU2Nzg5MCIsIm5hbWUiOiJKb2huIERvZSIsImlhdCI6MTUxNjIzOTAyMn0.v5qdy8w9Ygs5fdic9a1LuX76PUdx3omYd5GlDTAF3Ug