Before launching your integration, use Smartcar’s test mode to quickly test your application on a test vehicle. Test mode will return randomized data for every API request. If you prefer to control the vehicle type and receive consistent data in API responses, consider using Smartcar's Vehicle Simulator instead.

Test successful API requests

1. Enabling test mode

When launching Smartcar Connect, pass in the query parameter mode=test to enable test mode. Smartcar’s SDKs provide a convenient boolean to facilitate this:

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
const client = new smartcar.AuthClient({
  clientId: CLIENT_ID,
  clientSecret: CLIENT_SECRET,
  redirectUri: REDIRECT_URI,
  testMode: true,
});

2. Log into a test mode connected services account:

Click on any vehicle brand and log in with any email address (anything@anything.com) and any password.

3. Send an API request to the test mode vehicle.

Our API will return randomized data for each vehicle endpoint. See our API reference to learn more about the randomized data you should expect. If you use Single Select, use the below VIN and make a request as follows.
EmailVIN
smartcar@successful-request.com0SCAUDI037A5ADB1C
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
const scope = ["read_vehicle_info"]
const options = singleSelect: {vin: '0SCAUDI037A5ADB1C'}
authUrl = client.getAuthUrl(scope, options);

Test successful API requests with specific VINs

If you need a test vehicle with a specific VIN, you can still use test mode. When logging into a test mode connected services account (step 2 above), follow this format for the email address:

<VIN>@<compatibility level>.smartcar.com

VIN: This can be any 17-character alphanumeric string. Note: This string does not need to be a real VIN. Smartcar does not perform any VIN-specific validations.

Compatibility level: This string determines which permissions the test mode vehicle is capable of. The following table contains all valid compatibility levels and their corresponding permissions:

Compatibility levelPermissions
compatible OR phevAll permissions
incompatibleNo permissions
fuelPermissions that apply to a gasoline vehicle
bevPermissions that apply to a battery-electric vehicle

To use Single Select in test mode with a specific VIN, follow step 3 above and replace the Smartcar-provided VIN with the VIN of your choice. Then follow the email format <VIN>@<compatibility level>.smartcar.com using the same VIN.

See our API reference to learn about using our Compatibility API in test mode.