Create a user token

Learn how to create user tokens to initialize Argyle Link for existing users.

Argyle utilizes JWT tokens as user tokens.

A new user token should be generated every time you are initializing Argyle Link for an existing user. User tokens are short-lived and will expire.

To create a user token, send a POST request with the request body containing a JSON object with the following format: {"user": "<id>"}.

This request returns a JSON object as its payload, consisting of an access token and refresh token. Only the access token is passed as the user token when initializing Argyle Link. Visit our creating user tokens guide for more information.

{
    "access": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRfaWQiOiIwZDliNWJmMy05N2ZhLTQ3NTctYTEzNi1iMmEwM2QxNzE0MTQiLCJleHAiOjE2NTMyMzIxNDUsImlhdCI6MTY1MDY0MDE0NSwiaXNzIjoiYXJneWxlLWNvcmUtYXV0aC1wcm9kIiwianRpIjoiNzFkZjgzMGItOGJjYy00MDgyLTkxYzYtNjEwMTE0Njc3ODRhIiwic3ViIjoiMDE4MDUxOWUtNjIwZi1hNDgwLTBhNmQtMzA3YzA4NmMwNzczIiwidXNlcl9pZCI6IjAxODA1MTllLTYyMGYtYTQ4MC0wYTZkLTMwN2MwODZjMDc3MyJ9.qC0bQ0wFzVIp3I0a7BxjqrRha2Bexw5PycWIh1WQjTw",
    "refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NTMyMzIxNDUsImp0aSI6ImY4OWQ1NzkyLTcxZjYtNDM5ZS05NjZiLWVkY2M3ODYxODgwYSIsImlhdCI6MTY1MDY0MDE0NSwiaXNzIjoiYXJneWxlLWNvcmUtYXV0aC1wcm9kIiwic3ViIjoiMDE4MDUxOWUtNjIwZi1hNDgwLTBhNmQtMzA3YzA4NmMwNzczIn0.Y1KilybzFeNbGEAjkxhJ-VeTZT9i7iTtRHSwDsnH5Bs"
}
Language
Authentication
Basic
base64
:
Click Try It! to start a request and see the response here!