Prerequisites
API Authentication is available for applications using Smartcar’s webhooks offering and the v3 REST API. If your application was created before June 1st, 2025, you may need to upgrade to the v3 API in your Dashboard settings.Step 1: Generate Your API Credentials
Navigate to API Credentials
In your Smartcar Dashboard, go to your application and select the API Credentials tab.
Create an API Secret
Click Create Secret in the API Credentials section. Your client ID will be displayed, and a new client secret will be generated.
Step 2: Capture the User ID from Connect
When a user completes the Smartcar Connect flow, the redirect URL now includes auser_id parameter alongside the authorization code. Read more about Connect redirect url parameters here.
Step 3: Obtain an Access Token
Exchange your API credentials for an access token using the client credentials grant:Access tokens are valid for 1 hour. There is no refresh token — simply request a new token when the current one expires.
Step 4: Make API Requests
Include the access token in theAuthorization header:
When accessing vehicle signals or issuing commands, also include the
sc-user-id header set to the user’s ID obtained from the Connect redirect. See Step 2 above.Step 5: List User Connections
Use the Connections API to retrieve all vehicles connected by a specific user:Security Best Practices
- Never expose API credentials in client-side code (mobile apps, browser JavaScript, etc.)
- Rotate secrets periodically using the Dashboard
- Use environment variables or a secrets manager for credential storage
- Implement audit logging for access token usage
- Limit access to API credentials within your organization
Webhooks with API Authentication
When using API Authentication, webhook payloads include theuser.id field nested inside the data object. Both Vehicle Connection Status and Vehicle State events contain the userId alongside the vehicleId, allowing you to identify which user’s vehicle triggered the event:
What’s Next
- Overview — Understand when and why to use API Authentication
- Migration Guide — Transition from per-vehicle tokens
- FAQ — Common questions and answers
- Connections API Reference — List and manage connections
- Webhooks Overview — Set up event-driven updates

