For AI agents and LLMs: a machine-readable index is available at llms.txt. A plain-Markdown version of any documentation page is available by appending .md to its URL.
Skip to main content
TokenGenerate Service Account token
TestMu AI
StatusCommunityBlog
Token

Generate Service Account token

Generate Service Account token

POST
/api/organization/service-accounts/{id}/token
Generate Service Account token
curl --request POST \
--url "https://auth.lambdatest.com/api/organization/service-accounts/{id}/token" \
--header "Authorization: Basic <encoded-value>"
{
"message": "Access Token generated successfully",
"token": {
"id": 421827,
"token": "bmrt4HX52bTcOHniFl3HAA9G4ehQHnLqUkGmLPRVxfef4iIBVZ",
"user_id": 407938,
"username": "4152033k0HaL6tuC"
},
"type": "success"
}

Authorizations

Authorizationstringheaderrequired

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

Path Parameters

idintegerrequired

Service Account ID

Response

application/json

Success

messagestring
tokenobject
token.idnumber
Example: 421827
token.tokenstring
Example: "bmrt4HX52bTcOHniFl3HAA9G4ehQHnLqUkGmLPRVxfef4iIBVZ"
token.user_idnumber
Example: 407938
token.usernamestring
Example: "4152033k0HaL6tuC"
typestring
Generate Service Account token
curl --request POST \
--url "https://auth.lambdatest.com/api/organization/service-accounts/{id}/token" \
--header "Authorization: Basic <encoded-value>"
{
"message": "Access Token generated successfully",
"token": {
"id": 421827,
"token": "bmrt4HX52bTcOHniFl3HAA9G4ehQHnLqUkGmLPRVxfef4iIBVZ",
"user_id": 407938,
"username": "4152033k0HaL6tuC"
},
"type": "success"
}