Skip to main content
Vehicle Simulator allows you to test your application in realistic scenarios with a simulated Smartcar-compatible vehicle. Simulator responds to API requests just like a real vehicle. You can choose a simulated trip for your vehicle to take, and track it over time. You can use the simulator for initial testing before you have a real vehicle to connect, or as part of an end-to-end testing suite.

Creating a Simulated Vehicle

Simulated vehicles are managed in the Smartcar Dashboard. Select “Add a vehicle” and select a vehicle by Make, Model, and Year, or provide a VIN for a US-based vehicle that you want to simulate. You’ll be able to preview the API endpoints that are supported for the vehicle model you select. Once you create your simulated vehicle, you’ll select a simulated trip profile that the vehicle will follow. This profile can run automatically over time, or you can manually select a stage of the trip for the vehicle in the Dashboard.

Connecting a Simulated Vehicle

Simulated vehicles generate a special set of credentials that mimic what a real-world vehicle owner would have. You’ll use these credentials to establish a vehicle connection through the same Smartcar Connect flow that you will use for live vehicles. In order for Connect to know you’re using credentials generated from Vehicle Simulator, you’ll need to pass mode=simulated in the Connect URL.
Please ensure you’re passing or changing the country flag for Connect based on the region you’ve created your vehicle for. Failure to do so will result in an invalid credential error on login. You can read more about country selection for Connect here.
You can set mode in the auth client builder to simulated.
You’ll need to pass mode=simulated in the Connect URL

Making requests to a Simulated Vehicle

Once your simulated vehicle is connected, you can make API requests to it just as you would a real vehicle. Supported endpoints for the simulated vehicle will send responses with simulated data - unsupported endpoints will return errors just as they would with a real vehicle. You can also send commands to simulated vehicles, like start/stop charge or lock/unlock doors. These requests will send responses that mimic that of a real vehicle, but the vehicle state will continue to reflect the simulated trip that was selected.

Expected Responses

Data

Commands

Below are the various action requests that can be made to simulated vehicles, and what responses to expect based on the simulated vehicle’s current state or simulator support. Not listed here are the standard API errors that will be returned if the vehicle does not support the capability or the application has not been granted permission.

Errors

Mode Comparison

*When a real VIN is used either through VIN@smartcar for test mode, or generating a simulated vehicle with a real VIN.0SC and 1SC prefixed VINs will not work. **For supported brands - Toyota, Ford and Tesla.

FAQs

Smartcar uses the OAuth 2.0 Client Credentials flow for API authentication. Your application obtains a single application-level access token that works across all connected vehicles, including simulated ones.
  • Access tokens are valid for 1 hour
  • There is no refresh token — request a new token when the current one expires
  • The same token works for all vehicles connected to your application
See the API Authentication Overview for more details.
The number of simulated vehicles that can be created depends on your Smartcar plan tier. Please see here for more information.
  • Please check that you have launched Connect with the mode=simulated parameter
  • Please check that you are passing the country feature flag for the region you’ve set up your vehicle with. Please see Country Selectionfor Connect for more information.