Test your integration
Test mode
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 option to facilitate this:
const client = new smartcar.AuthClient({
clientId: CLIENT_ID,
clientSecret: CLIENT_SECRET,
redirectUri: REDIRECT_URI,
mode: 'test',
});
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.
VIN | |
---|---|
smartcar@successful-request.com | 0SCAUDI037A5ADB1C |
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 level | Permissions |
---|---|
compatible OR phev | All permissions |
incompatible | No permissions |
fuel | Permissions that apply to a gasoline vehicle |
bev | Permissions 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.