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 refresh the access token.

Endpoint

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

Request

curl
curl -X POST "https://api.pleos.ai/v1/auth/token" \
-H "Content-Type: application/json" \
-H "Brand: hyundai" \
-d '{
"clientId": "<YOUR_CLIENT_ID>",
"clientSecret": "<YOUR_CLIENT_SECRET>",
"code": "<AUTHORIZATION_CODE>",
"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 requesting Vehicle Data API use under Pleos Playground > My Project.Required

Response

Success

200
{
"data": {
"accessToken": "<ACCESS_TOKEN>",
"refreshToken": "<REFRESH_TOKEN>"
},
"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 refreshing the token. Valid for 90 days after issuance and can only be used once.

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 code in case of failure, refer to Error Code.