Skip to content

Authentication

The Auto Trader API uses access tokens for authentication. To access the API, you must include an Authorization header with a valid token in your HTTP requests.

Obtain an access token using your API credentials.

GET auth_token_url
X-API-Key: api_secret
X-API-Application-Id: application_id

Values for auth_token_url, api_secret, and application_id should be replaced with your actual API token URL, secret key, and application ID respectively. These values can be found on the Processor tab of the Dealer Dashboard.

The token endpoint returns a JSON object with an access token and expiry timestamp in ticks, e.g.

{
"accessToken": "eyJh...usDM",
"expiresAtUtc": 639045564210930277
}

Use the access token for all API calls by including it in the Authorization header as a Bearer token:

POST /api/v1/listing/vehicle
Authorization: Bearer eyJh...usDM
...

Tokens will expire and become invalid once the expiresAtUtc timestamp is passed and endpoints will return a 401 unauthorized response. There is no token refresh mechanism, you must request a new token using your API credentials.