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.
Obtaining a Access Token
Section titled “Obtaining a Access Token”Obtain an access token using your API credentials.
GET auth_token_urlX-API-Key: api_secretX-API-Application-Id: application_idValues 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}Using the Access Token
Section titled “Using the Access Token”Use the access token for all API calls by including it in the Authorization header as a Bearer token:
POST /api/v1/listing/vehicleAuthorization: Bearer eyJh...usDM
...Token Expiration
Section titled “Token Expiration”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.