Skip to main content
POST///
This endpoint returns a single-use access token. This type of token authorizes a single request to access API endpoints and data associated with a particular user. A single-use access token differs from a user access token (as returned by POST /users/auth/login) only in the number of times it can be used. To return a single-use access token, send a POST request to the /users/auth/onetime endpoint. Provide one of these sets of input data:
  • Case #1 – Application token and user access token
  • Case #2 – Application token, admin access token, and user token
  • Case #3 – Application token, user’s Marqeta password, and user’s email address
In each case, provide the application token as the HTTP Basic Authentication username in the request header’s Authorization field. When applicable, provide the user access token or admin access token as the HTTP Basic Authentication password. When applicable, provide the user token or user’s Marqeta password and email address in JSON format in the request body. Before instantiating an embedded Marqeta widget, call this endpoint to obtain the single-use access token required as input (cases #1 and #2). This endpoint is also useful when you want to check a user’s credentials before performing a sensitive operation without having to log out the user (case #3).
Note
Calling this endpoint and returning a single-use access token does not invalidate the user’s current user access token.

Request body

Sample request body

Case 1: Authorization: Basic my_application_token:my_user_access_token
JSON
Case 2: Authorization: Basic my_application_token:my_admin_access_token
JSON
Case 3: Authorization: Basic my_application_token
JSON

Response body

Sample response body

JSON