Skip to main content
TokenFetch Service Account Token
TestMu AI
StatusCommunityBlog
Token

Fetch Service Account Token

Fetch Service Account Token

GET
/api/organization/service-accounts/{id}/token
Fetch Service Account Token
curl --request GET \
--url "https://auth.lambdatest.com//api/organization/service-accounts/{id}/token" \
--header "Authorization: Basic <encoded-value>"
{
"message": "Access Token retrieved successfully",
"token": {
"id": 426314,
"token": "EwnnWltfbiauIWQcGp5R6WlgIZgiP0FIuNszYIM8qP4NSuwveC",
"user_id": 407939,
"username": "415203LOjvQIAizR"
},
"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: 426314
token.tokenstring
Example: "EwnnWltfbiauIWQcGp5R6WlgIZgiP0FIuNszYIM8qP4NSuwveC"
token.user_idnumber
Example: 407939
token.usernamestring
Example: "415203LOjvQIAizR"
typestring
Fetch Service Account Token
curl --request GET \
--url "https://auth.lambdatest.com//api/organization/service-accounts/{id}/token" \
--header "Authorization: Basic <encoded-value>"
{
"message": "Access Token retrieved successfully",
"token": {
"id": 426314,
"token": "EwnnWltfbiauIWQcGp5R6WlgIZgiP0FIuNszYIM8qP4NSuwveC",
"user_id": 407939,
"username": "415203LOjvQIAizR"
},
"type": "success"
}