> ## Documentation Index
> Fetch the complete documentation index at: https://www.marqeta.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate UX Toolkit authentication token

> Warning This endpoint has been deprecated.

POST/auth/login

> [!CAUTION]
>
> **Warning** This endpoint has been deprecated. Refer to the [Authentication workflow](https://www.marqeta.com/docs/developer-guides/uxt-getting-started.md#_authentication_workflow) section of [UX Toolkit Getting Started](https://www.marqeta.com/docs/developer-guides/uxt-getting-started.md) for details on how to authenticate with OAuth 2.0.

Use this endpoint to generate your UX Toolkit authentication token.

This token enables access to the specified account in order for your application's back end to pass it to your JavaScript. For details, see [UX Toolkit Getting Started](https://www.marqeta.com/docs/developer-guides/uxt-getting-started.md).

## Request body

| Fields | Description |
| - | - |
| user\_token string  Required | Unique identifier of the user account holder. **Allowable Values:**  1–36 chars  Existing user token |

## Sample request body

```json JSON lines wrap theme={null}
{
  "user_token": "a94c2e7e-9383-4486-9759-8c04cf672e4e"
}
```

## Response body

| Fields | Description |
| - | - |
| program\_short\_code string  Returned | Program short code on the Marqeta platform. **Allowable Values:**  Existing program short code |
| token string  Returned | Token string to be passed to the UX Toolkit's `bootstrap()` method. **Allowable Values:**  Authentication token |

## Sample response body

```json JSON lines wrap theme={null}
{
  "program_short_code": "myprgrm",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcm9ncmFtX3Nob3J0X2NvZGUiOiJteXByZ3JtIiwidXNlcl90b2tlbiI6IjE0OWNjYjVmLWUwZDYtNGMwZS05MjAzLWJkMDkyZGI0N2UzNCJ9.6TdyvMOa_eUSvN5GpUZKBOgcHxmWTuYQPMEgNwBfVS0"
}
```


## Related topics

- [UX Toolkit Overview](https://www.marqeta.com/docs/core-api/uxt-sdk.md)
- [Generate UX Toolkit OAuth access token](https://www.marqeta.com/docs/core-api/uxt-sdk/generate-ux-toolkit-oauth-access-token.md)
- [Customer Authentication API](https://www.marqeta.com/docs/developer-guides/uxt-customer-authentication-api.md)
- [UX Toolkit Getting Started](https://www.marqeta.com/docs/developer-guides/uxt-getting-started.md)
- [Customizing UX Toolkit](https://www.marqeta.com/docs/developer-guides/uxt-customizing-ux-toolkit.md)
