Skip to main content

Create Access Token

Description

Issue an access token required to call the Vehicle Data API.
The access token is valid for 1 hour. After the access token expires, Refresh Access Token is called to renew the access token.

Endpoint

POST https://security-api.pleos.ai/v1/auth/token

Request

curl
curl -X POST "https://security-api.pleos.ai/v1/auth/token" \
-H "Content-Type: application/json" \
-H "Brand: hyundai" \
-d '{
"clientId": "abc14400-7aa5-3eac-b364-xxxxxxxxxxxx",
"clientSecret": "xyzsrr1jr4vl91c8pjn4j9s8lp4sxxxxxxxxxxxx",
"code": "a1a2a3a4-1010-2020-xyz1-2166063cb6af.2222b4b4-adde-4c73-8dc3-bc95ebc3935",
"redirectUrl: "https://www.example.com/auth/hyundai"
}'

Header Params

ParameterTypeDescriptionRequired
Content-Typestringapplication/jsonOptional
BrandstringVehicle brand (hyundai/kia/genesis)Required

Body Params

ParameterTypeDescriptionRequired
clientIdstringEnter the Client ID found in Pleos Playground > My Project.Required
clientSecretstringEnter the Client Secret found in Pleos Playground > My Project.Required
codestringEnter the authorization code (code) returned to the redirect URL (redirectUrl) upon successful login.Required
redirectUrlstringEnter the OAuth Login > Login Redirect URL that was provided when applying for Vehicle Data API use under Pleos Playground > My Project.Required

Response

Success

200
{
"data": {
"accessToken": "mygI7P7ZDxUeorkIAg7xUK5ULGsUrpOmKU5qSXZvyuYk1ZKRObTKQrFBAowtIWxSB5V58qvd4kXsvrB6XSY6Eu7s7SrQGcrGeVL951TmWizLZRHqxWfLCfoOqayZh38wO0OoxyVogWAGZe2EFASZgPPMR3SshsXzoriwYSJf1uy98S5QKtGdMhDCB6jc557H0YlG1IWVKqXtm34v8s1Mcz1z3b4OZRmSsQjLOWLPSZewK53YJ5vWlW1IYLCwZe8zzvPYdu5WDelpO3ae07WVA1yVgBFH2RSF2UzSQ0II3zbAW0RvwPXoFX9sgaAXIqAuuSrs77YFYz6ff3Jrj3LccQ1BjEb0sGYLkG3PsUxbKPqciVWZjouiCBuGMmtUjDJkyagV5qbe3xV0VetaOG3vl2pEcgCMR0e9zHlTQkzJfPmv",
"refreshToken": "T9F38OE6PA8CT9V52F30KKKSRA6T5SRDA400"
},
"meta": {
"code": 200,
"message": "Success",
"success": "true",
"timestamp": "2025-09-01T11:00:00Z",
"requestId": "835bdbd4-1105-4a8c-b438-a1b2c3d4f5g6"
}
}
data fieldTypeDescription
accessTokenstringA token that allows access to the Vehicle Data API. Valid for 1 hour after issuance of the access token.
refreshTokenstringValue used for renewing the token. The refreshToken is valid for 180 days.

Failure

4002
{
"error": {
"code": "4002",
"message": "Invalid request parameters",
"details": [],
"timestamp": "2025-09-01T11:00:00Z",
"requestId": "835bdbd4-1105-4a8c-b438-a1b2c3d4f5g6"
}
}
[Error Code]

For details about error codes in case of failure, refer to Error Code.