Skip to main content
User ProfileGenerate token by user
TestMu AI
StatusCommunityBlog
User Profile

Generate token by user

Generate token by user

POST
/api/users/token
Generate token by user
curl --request POST \
--url "https://auth.lambdatest.com//api/users/token" \
--header "Authorization: Basic <encoded-value>"
{
"message": "Access Token generated successfully",
"token": {
"id": 421758,
"token": "moZ9TJNna0e5CJ744Ab0e7SBIhXRywG5DiaZzmd9atYQk6WNBv",
"user_id": 407868,
"username": "pawan17"
},
"type": "success"
}

Authorizations

Authorizationstringheaderrequired

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Response

application/json

Success

messagestring
tokenobject
token.idnumber
Example: 421758
token.tokenstring
Example: "moZ9TJNna0e5CJ744Ab0e7SBIhXRywG5DiaZzmd9atYQk6WNBv"
token.user_idnumber
Example: 407868
token.usernamestring
Example: "pawan17"
typestring
Generate token by user
curl --request POST \
--url "https://auth.lambdatest.com//api/users/token" \
--header "Authorization: Basic <encoded-value>"
{
"message": "Access Token generated successfully",
"token": {
"id": 421758,
"token": "moZ9TJNna0e5CJ744Ab0e7SBIhXRywG5DiaZzmd9atYQk6WNBv",
"user_id": 407868,
"username": "pawan17"
},
"type": "success"
}