Test your integration
Test requests
Before launching your integration, we recommend using Smartcar’s test mode to test your application on a simulated vehicle.
Test successful API requests
-
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:const client = new smartcar.AuthClient({ clientId: CLIENT_ID, clientSecret: CLIENT_SECRET, redirectUri: REDIRECT_URI, scope: ['read_vehicle_info'], testMode: true, });
-
Log into a simulated connected services account:
Click on any vehicle brand and log in with any email address (anything@anything.com) and any password.
-
Send an API request to the simulated 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.
Email VIN smartcar@successful-request.com 0SCAUDI037A5ADB1C authUrl = client.getAuthUrl({ singleSelect: {vin: '0SCAUDI037A5ADB1C'} });
Test successful API requests with specific VINs
If you need a simulated vehicle with a specific VIN, you can still use test mode. When logging into a simulated 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 simulated 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.