# Smartcar > ## Documentation Index --- # Source: https://smartcar.com/docs/changelog/2022.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # 2022 Releases ## January 5, 2022 Smartcar is now compatible with Mercedes-Benz vehicles in the United States. ## February 23, 2022 The EV Battery and EV Charging status and control endpoints are now available for Lexus and Toyota vehicles in Canada and the United States. ## February 21, 2022 The Tire Pressure endpoint is now available for Lexus and Toyota vehicles in Canada and the United States. ## February 14, 2022 Smartcar is now compatible with Chrysler, Dodge, Jeep, and RAM vehicles in Canada. ## February 2, 2022 Brand-specific endpoints are now available for Cadillac, Chevrolet, and Tesla. A full list of the available endpoints is available in the API Reference. ```Node Node theme={null} const amperage = vehicle.request('GET', 'tesla/charge/ammeter'); ``` ```Python Python theme={null} amperage = vehicle.request("GET", "tesla/charge/ammeter") ``` ```Java Java theme={null} SmartcarVehicleRequest request = new SmartcarVehicleRequest.Builder() .method("GET") .path("tesla/charge/ammeter") .build(); VehicleResponse amperage = vehicle.request(request); ``` ```Ruby Ruby theme={null} amperage = vehicle.request("GET", "tesla/charge/ammeter") ``` ## March 7, 2022 Smartcar is now compatible with MINI vehicles in Canada, the United States, and our supported European countries. ## April 13, 2022 Smartcar's webhooks now have beta support for sending events in response to events that are generated by the vehicle itself. The initial release supports the following events on Ford, Tesla, and Toyota vehicles in Canada, the United States, and our supported European countries: * `CHARGING_STARTED` * `CHARGING_STOPPED` * `CHARGING_COMPLETED` Webhook events sent in response to vehicle events can be distinguished from schedule events based on the `eventName` property of the POST body. For example, the POST body for event based webhooks will have the following structure: ```json theme={null} { "version": "2.0", "webhookId": "uuid", "eventName": "eventBased", "mode": "test|live", "payload": { "eventId": "uuid", "vehicleId": "uuid", "eventType": "CHARGING_STARTED|CHARGING_STOPPED|CHARGING_COMPLETED", "eventTime": "ISO8601 Datetime" } } ``` ## May 9, 2022 Smartcar is now compatible with Kia vehicles in our supported European countries. ## May 5, 2022 The API now returns more detailed errors for the following: `UPSTREAM:RATE_LIMIT` - a request fails due to a vehicle rate limit. `VEHICLE_STATE:NOT_CHARGING` - a vehicle is not charging (only applies to endpoints that return details about a specific charging session e.g. Charging Completion Time). ## June 29, 2022 Smartcar is now compatible with Peugeot and Opel vehicles in our supported European countries. ## June 22, 2022 The Tire Pressure endpoint is now available for BMW, MINI, and Tesla vehicles in Canada, the United States, and our supported European countries. ## June 15, 2022 The API now returns a more detailed VEHICLE\_STATE error whenever a charge request fails due to charger issues or charging schedules. Click the following link to learn more: VEHICLE\_STATE:CHARGE\_FAULT ## June 8, 2022 Smartcar is now compatible with Nissan vehicles in our supported European countries. ## July 20, 2022 Smartcar is now compatible with Citroën, DS, and Vauxhall vehicles in our supported European countries. ## July 6, 2022 The following brand-specific endpoints are now available for Tesla vehicles in Canada, the United States, and our supported European countries: * GET `/tesla/compass` * GET `/tesla/speedometer` ## August 24, 2022 Smartcar is now compatible with Rivian vehicles in the United States. ## August 3, 2022 Smartcar is now compatible with Škoda vehicles in our supported European countries. The EV Charging control endpoint is now available for Hyundai vehicles in the United States. The EV Battery Capacity endpoint is now available in our supported European countries. ## September 22, 2022 The following brand-specific endpoint is now available for Tesla vehicles in Canada, the United States, and our supported European countries: * `POST /tesla/charge/ammeter` ## November 30, 2022 Smartcar is now compatible with Kia vehicles in Canada and the United States. ## December 29, 2022 The Location endpoint is now available for Volkswagen ID series vehicles in our supported European countries. --- # Source: https://smartcar.com/docs/changelog/2023.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # 2023 Releases ## January 6, 2023 Smartcar API v1.0 has been sunset and is no longer supported. If you are currently using v1.0 for API requests, webhooks, errors, or compatibility, we recommend switching to v2.0 as soon as possible. ## March 16, 2023 The API now returns a new code for the RATE\_LIMIT error type if your application tries to make a request to a vehicle too frequently. Click the following link to learn more: [RATE\_LIMIT:VEHICLE](https://smartcar.com/docs/errors/v2.0/rate-limit/#vehicle) ## March 14, 2023 Smartcar has revamped the Connect flow UI and backend to improve error handling and optimize user conversion rates. Our updates fall into 3 categories: improving brand selection, expanding login methods, and establishing new error codes specific to Connect. These include: 1. Allowing a user to search for: a. Brand aliases in Brand Select such as VW for Volkswagen b. Unavailable brands that we plan to introduce in the future, which will display a message highlighting future compatibility with the chosen brand. 2. Expanding login method coverage to include phone numbers for certain brands. We now allow users to log in using email or phone number for the Connect flow starting with Kia and Mercedes-Benz. Stay tuned to our changelog for more brand updates. 3. Providing clearer errors for the Connect flow: a. no\_vehicles for when the user does not have any vehicles tied to their account and they click to go back to the application b. configuration\_error for when exiting Connect back to your app through an error page (see below). c. server\_error which is thrown if there is not another Connect error specified. More documentation on error handling can be found [here](https://smartcar.com/docs/integration-guide/test-your-integration/test-errors/#1-connect-errors). ## March 6, 2023 The disconnect endpoint now supports the use of management API token (MAT) for authorization purposes. Documentation can be found [here](https://smartcar.com/docs/api#delete-disconnect) ## May 10, 2023 Smartcar is now compatible with Infiniti vehicles in the United States. ## June 7, 2023 Smartcar is now compatible with Hyundai vehicles in Canada. ## June 5, 2023 Test mode supports the following email format with any password to generate an account with multiple vehicles: `-vehicles@smartcar.com` ## July 26, 2023 The following brand-specific endpoints are now available for Tesla vehicles in Canada, the United States, and our supported European countries: * GET `/tesla/charge/records` * GET `/tesla/charge/records/billing` ## July 19, 2023 Smartcar is now compatible with Mercedes-Benz vehicles in our supported European countries. ## July 12, 2023 The following brand-specific endpoints are now available for Tesla vehicles in Canada, the United States, and our supported European countries: * GET `/tesla/charge/schedule` * POST ` /tesla/charge/schedule` * GET `/tesla/climate/cabin` * POST ` /tesla/climate/cabin` * GET `/tesla/climate/defroster` * POST ` /tesla/climate/defroster` * GET `/tesla/climate/steering_wheel` * POST ` /tesla/climate/steering_wheel` ## August 22, 2023 The following brand-specific endpoints are now available for Nissan vehicles in the United States: * GET /nissan/charge/schedule * PUT /nissan/charge/schedule ## August 17, 2023 The following endpoints are now available to manage vehicle connections: * GET Vehicle Connections * DELETE Vehicle Connections ## August 9, 2023 The following brand-specific endpoints are now available for Ford and Lincoln vehicles in Canada, the United States, and our supported European countries: * GET ford/charge/schedule\_by\_location * PUT ford/charge/schedule\_by\_location * GET lincoln/charge/schedule\_by\_location * PUT lincoln/charge/schedule\_by\_location ## September 21, 2023 Introducing Vehicle Management! With this initial release you're able to see and manage vehicles connected to your applications from within the [Smartcar Dashboard](https://dashboard.smartcar.com/login).

Logos and brand names are for identification purposes only and do not indicate endorsement of or affiliation with Smartcar. ## September 19, 2023 [Charge Records](/api-reference/bmw/get-charge-records) is now available as a make specific endpoint for BMW and MINI in Canada, the United States, and our supported European countries. ## September 06, 2023 Lock Status is now available as a Core endpoint and supported by the following makes: * Tesla (Global) * Ford (Global) * Kia (Global) * Jaguar (Global) * Land Rover (Global) * BMW (Global) * MINI (Global) * Lincoln (US) * Toyota (US) * Lexus (US) In addition to the lock status of the vehicle, Smartcar will also return the open status of doors, sunroof, windows, based on what the vehicle supports. ## October 19, 2023 BMW and MINI EVs are now compatible with the following endpoints globally: * [Get Charge Limit](/api-reference/evs/get-charge-limit) * [Set Charge Limit](/api-reference/evs/set-charge-limit) ## October 5, 2023 Smartcar is now compatible with Hyundai in supported European countries. ## October 3, 2023 Smartcar is now compatible with Mazda and Porsche in supported European countries. ## November 15, 2023 Smartcar is now compatible with CUPRA in supported European countries. --- # Source: https://smartcar.com/docs/changelog/2024.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # 2024 Releases ## Fetched At Header A new [SC-Feched-At](https://smartcar.com/docs/api-reference/headers) header is now available. This new header highlights when Smartcar fetched the returned data from an OEM whereas `sc-data-age` indicates when the returned data was recorded by the vehicle. ## Connect Playground The [Connect Playground](https://smartcar.com/docs/getting-started/dashboard/playground) is available, making it easier than ever to create your Connect URL and start requesting vehicle consent. ## Diagnostic Webhook A new [Diagnostic Webhook](https://smartcar.com/docs/getting-started/tutorials/webhooks-diagnostic) is available in beta. This webhook delivers either [Diagnostic Trouble Code](https://smartcar.com/docs/api-reference/get-dtcs) events or [System Status](https://smartcar.com/docs/api-reference/get-system-status) changes. ## Diagnostic Trouble Codes A new [Diagnostic Trouble Code](https://smartcar.com/docs/api-reference/get-dtcs) endpoint is available in beta. This endpoint returns a list of active Diagnostic Trouble Codes (DTCs) and the timestamp they last became active. ## Ford authentication update Ford's authentication process has been updated to require the use of SDKs. Our [Connect SDKs](https://smartcar.com/docs/connect/connect-sdks) have been updated to redirect to Ford's site to handle the authentication process when the user logs in. ## System Status endpoint now in Beta A new [System Status](https://smartcar.com/docs/api-reference/get-system-status) endpoint is available in beta. This endpoint returns a list of vehicle components and their health state for FCA and GM makes. ## Webhooks subscription status The Smartcar Dashboard now indicates which webhooks a vehicle is subscribed to. From the Vehicles table, click into the three dot menu to view vehicle details. From here, navigate to the new Webhooks tab! ## Dynamic Webhooks now in Beta [Dynamic Webhooks](/getting-started/tutorials/webhooks-dynamic) are now in beta for Enterprise customers! Please request access from the Webhooks tab on the Smartcar Dashboard! ## Multi-Factor Authentication in Dashboard [Multi-Factor Authentication](/getting-started/dashboard/dashboard-mfa) is available to offer an additional layer of security for the Smartcar Dashboard. ## Support for MG in Europe Support for the following endpoints are now available for the MG brand in Europe: * [VIN](/api-reference/get-vin) * [Odometer](/api-reference/get-odometer) * [Lock Status](/api-reference/get-lock-status) * [Lock/Unlock](/api-reference/control-lock-unlock) * [Tire Pressure](/api-reference/get-tire-pressure) * [GET Charge Limit](/api-reference/evs/get-charge-limit) * [POST Charge Limit](/api-reference/evs/set-charge-limit) * [Battery Level](/api-reference/evs/get-battery-level) * [Battery Capacity](/api-reference/evs/get-battery-capacity) ## Support for Honda, Subaru, Acura, and more! Smartcar is now compatible with the **Honda Prologue**, **Subaru Solterra** and the **Acura ZDX** in supported regions. ### Additional Releases The following brands now support [Control Charge](/api-reference/evs/control-charge), [Battery Level](/api-reference/evs/get-battery-level), [Battery Capacity](/api-reference/evs/get-battery-capacity) and [Charge Status](/api-reference/evs/get-charge-status): * Jeep, Fiat and Alfa Romeo (US, Canada and Europe) * Chevrolet, Cadillac and GMC (US and Canada) * RAM and Dodge (US and Canada) * Porsche (US and Europe) * Mazda (US and Europe) * Renault (Europe) * Nissan (Europe) ## Smartcar is now compatible with Dacia in Europe. Support for the following endpoints are now available for the MG brand in Europe: * [Vehicle Info](/api-reference/get-vehicle-info) * [Location](/api-reference/get-location) * [Control Charge](/api-reference/evs/control-charge) * [State of Charge](/api-reference/evs/get-battery-level) * [Charging Status](/api-reference/evs/get-charge-status) ## Connect Insights is now available! * Each Connect flow launched for the previous two weeks is available in the Smartcar Dashboard with a variety of ways to search for specific Connect launches. * Enterprise customers have access to funnel analysis so they can understand their conversion rates in the Connect flow. ## Test & Simulated modes are now one Test and Simulated mode have been combined into a singular mode; Simulated. If a simulated vehicle is enabled, we will return data following the selected trip. If the simulated vehicle doesn't support the requested endpoint, randomized data will be returned. If no simulated vehicle is enabled for, we will return data as if a simulated vehicle with "Day Commute" was selected. If the simuday commute doesn't support the requested endpoint, randomized data will be returned. ## Support for Google authentication in Dashboard The Smartcar Dashboard now supports Google authentication. ## User information for Tesla The following endpoints are now available for Tesla: * [Get User Info](/api-reference/tesla/get-user-info) * [Get User access](/api-reference/tesla/get-user-access) ## Customize brands in Connect You can now customize which bands show up in Connect from the [Dashboard](https://dashboard.smartcar.com/). Easily manage which brands your users can connect to based on engine type or endpoint. ## Get charge endpoint for Audi The following Brand Specific Endpoint is now available for Audi: * [Get Charge Status](/api-reference/audi/get-charge) ## Additional endpoints for Audi The following endpoints are now available for Audi: * [Get Charge Limit](/api-reference/evs/get-charge-limit) * [Set Charge Limit](/api-reference/evs/set-charge-limit) * [Control Charge](/api-reference/evs/control-charge) * [Lock Status](/api-reference/get-lock-status) ## Service history The following endpoint is now available for Ford, Lincoln, Toyota, Lexus, Mazda and Volkswagen (US) vehicles: * [GET /service/history](/api-reference/get-service-records) ## Tesla alerts The following make specific endpoint is now available for Tesla across all supported regions: * [GET /tesla/alerts](/api-reference/tesla/get-alerts) ## Tesla charge battery and suggested user messages The following make specific endpoints are now available for Tesla across all supported regions: * [GET /tesla/charge](/api-reference/tesla/get-charge) * [GET /tesla/battery](/api-reference/tesla/get-battery) ### Additional Releases Suggested user messages are now included as part of API error responses for you to easily surface resolution steps to vehicle owners. See our [error documentation](/api-reference/api-errors) for more details. ## Country management for Smartcar Connect Country Management is now available for Connect! Easily manage what countries are enabled for your application on Dashboard. ### Additional Releases The `user` parameter is now available when [building the Connect URL](/connect/redirect-to-connect) to pass a unique identifier for a vehicle owner to track and aggregate analytics across their Connect sessions for your application. ## Organization access for teams Organization access for Teams is now available on Dashboard. Check out our docs page on [Teams](/getting-started/dashboard/teams) for details. ### Additional Releases The following endpoint is now available for Tesla vehicles globally: * [Virtual Key Status](/api-reference/tesla/get-virtual-key-status) ## Subaru US Smartcar is now compatible with Subaru in the US. ### Additional Releases The following endpoints are now available for Tesla vehicles globally: * [Control Charge Port](/api-reference/tesla/control-charge-port) * [Control Frunk](/api-reference/tesla/control-frunk) * [Control Trunk](/api-reference/tesla/control-trunk) ## Fuel endpoint for European brands The [GET /fuel](/api-reference/get-fuel-tank) endpoint is now available for the following brands in supported European countries: |
|
|
|
| | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | | Audi | Hyundai | Mercedes-Benz | Skoda | | BMW | Jaguar | MINI | Vauxhall | | Citroen | Kia | Opel | Volkswagen | | DS | Land Rover | Peugeot | Volvo | | Ford | Mazda | Renault | | --- # Source: https://smartcar.com/docs/getting-started/Implementation-Checklist.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Implementation Checklist > Use this guide to track your progress through the Smartcar integration process, from initial setup to production launch. ## Phase 0: Pre-Kickoff * **Tech Stack:** Identify technology stack for implementation and explore appropriate SDKs ([frontend](https://smartcar.com/docs/connect/connect-sdks) and [backend](https://smartcar.com/docs/api-reference/api-sdks)) and [getting started resources](https://smartcar.com/docs/getting-started/introduction). * **Tesla Tenanting:** (*Enterprise Only*) Check in with your Solution Architect to ensure you have your Tesla Tenant set up enabling your org to have a [Virtual Key with your own brand name](https://smartcar.com/docs/help/oem-integrations/tesla/virtual-key-tesla#enterprise-plan). * **Slack Channel**: (*Enterprise Only*) Smartcar will set up a [dedicated Slack channel](https://smartcar.com/docs/help/assist-ai-slack) for technical communications - ensure the relevant stakeholders are added. ## Phase 1: Application Setup & Security Foundation * **Team Access:** [Invite relevant team members](https://smartcar.com/docs/getting-started/dashboard/teams#members) to your Smartcar Dashboard account. * **Subscribe to Updates:** Ensure your team subscribes to [status.smartcar.com](https://status.smartcar.com), [brandreliability.smartcar.com](https://brandreliability.smartcar.com) and [product changelogs](https://smartcar.com/docs/changelog/latest) to stay informed on platform health and updates. * **Environment Setup:** Create distinct **Test** and **Production** applications in the dashboard with clear naming conventions. * **Credentials:** Capture and securely store your `Client ID`, `Client Secret`, and `Application Management Token`. * **Secret Management:** Integrate your `Client Secret` into an enterprise secrets management system (e.g. AWS Secrets Manager, Vault). **Never commit secrets to version control.** * **Connect Configuration:** Set each application’s Privacy Policy URL and Logo. * **Redirect URIs:** Configure the Redirect URI for each application (ensure they are externally accessible). * **Scope Definition:** [Define your Vehicle Access Configuration](https://smartcar.com/docs/getting-started/how-to/configure-permissions#how-to-configure-permissions-for-vehicle-data-collection) (OAuth scopes) based on the specific signals and commands your application requires. * **Scope Minimization:** Strictly enforce **Scope Minimization** by requesting only the minimum necessary data permissions from the user. * **Brand Select:** Confirm and specify which OEM Brands will be displayed to the user and if you want to automatically add any new brands as they become available. * **Compatibility Check:** *(Enterprise Only)* Validate target vehicle compatibility using the [Region and Make Compatibility API](https://smartcar.com/docs/api-reference/compatibility/by-region-and-make). ## Phase 2: Connect Flow & Conversion Optimization * **User Journey:** Determine how your application will funnel users into the Smartcar Connect flow. * **Frontend Implementation:** Implement the frontend Connect flow to generate the authorization URL (using `link.getAuthUrl()`). * **First Connection:** Onboard your first test vehicle and review its data in the Smartcar Dashboard. * **Brand Select:** Assess and implement [**Brand Select**](https://smartcar.com/docs/connect/advanced-config/flows#bypassing-the-brand-selection-screen) functionality (if applicable) to skip the brand selection screen and accelerate the user flow. * **Error Simulation:** Validate your application’s error handling by testing with [simulated error VINs ](https://smartcar.com/docs/errors/testing-errors#testing-errors)(e.g., using the `invalid_subscription` trigger). ## Phase 3: Core Implementation & Token Resilience * **Architecture**: Design the backend architecture. * **Webhook Endpoint:** Implement a [backend endpoint to receive webhook data](https://smartcar.com/docs/integrations/webhooks/receiving-webhooks) and error payloads. * **Callback Endpoint:** Implement a backend endpoint to receive the authorization code at your [Redirect URI.](https://smartcar.com/docs/getting-started/tutorials/backend) * **Token Exchange:** Implement the logic to [exchange](https://smartcar.com/docs/api-reference/authorization/overview#token-management) the authorization `code` for an `accessToken` (valid for 2 hours) and `refreshToken` (valid for 60 days). **This must be done server-side.** * **Secure Storage:** [Securely store tokens](https://smartcar.com/docs/getting-started/how-to/get-an-access-token) in an **encrypted backend database**. Tokens must never be stored client-side. * **Proactive Renewal:** Implement a service to exchange the `refreshToken` for a new token pair before the 60-day expiration window closes. * **Atomic Token Rotation:** Implement **Atomic Token Rotation** logic to ensure new token pairs are persisted reliably, preventing race conditions that could invalidate single-use tokens. * **Support Protocol:** Establish internal support protocols to handle questions from your vehicle owners (ensure your team acts as Tier 1 support before escalating to Smartcar). ## Phase 4: Operational Scale & Error Handling * **Webhooks-First:** *(If migrating)* Shift data ingestion models from polling to a **Webhooks-First** architecture for real-time scalability. * **Webhook Configuration:** Configure Webhook integrations in the Smartcar Dashboard (select triggers, set callback URI). * **Payload Verification:** Implement the mandatory callback URI verification logic (responding to the `VERIFY` event with the challenge hash). * **User Error Handling:** Map Connect errors (e.g. `no_vehicles`) to clear, actionable messages for your users. * **Vehicle Error Handling:** Handle `VEHICLE_ERROR` events and trigger user notifications when specific vehicle owner actions are required to resolve the issue. * **Re-authentication:** Implement resolution logic for `ACCOUNT_ISSUE` errors by prompting the user to re-authenticate via Smartcar Connect. * **Rate Limiting:** Implement **Exponential Backoff** strategies for retrying API errors (429) and adhere to `Retry-After` headers. ## Phase 5: Production Readiness Review * **Access Control:** Ensure all service-specific IAM roles adhere to the principle of least privilege. * **Secret Management:** Verify all secrets are stored and accessed via a dedicated secrets manager. * **Encryption:** Ensure data is encrypted at rest and in transit. * **Vulnerability Scanning:** Confirm that dependency and vulnerability scans pass with zero critical/high issues. * **Network Security:** Configure firewalls/security groups to block unauthorized ports and apply WAF rules where appropriate. * **Logging:** Ensure structured logs are successfully ingested for staging and production environments, with configurable log levels. * **Observability:** Configure a dashboard to capture essential metrics (Latency, Error Rate, Traffic). * **Alerting:** Configure critical alerts to route to your on-call channels. * **CI/CD:** Ensure a fully automated build and deployment pipeline is in place for all environments. * **Infrastructure as Code (IaC)**: The service infrastructure is managed using IaC (e.g., Terraform, CDK). * **Architecture Review Complete:** The service architecture has passed the formal review. * **Service Runbook:** A complete runbook exists detailing: service owners, quick start, deployment, scaling, and incident response. * **Tagging:** Tagging policy is applied to infrastructure. * **Support Review:** Review the vehicle owner support approach again and ensure VO's are not channeled to Smartcar support directly and that Smartcar support is used as Tier 3 --- # Source: https://smartcar.com/docs/api-reference/about-brand-specific.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Make Specific Endpoints The Vehicles API v2.0 will be deprecated by **Q3 of 2026**. We recommend migrating to the [latest version](/api-reference/vehicles-api-intro) as soon as possible to ensure continued support and access to new features. In cases where there are many differences in how each OEM provides the same data, Smartcar would provide you with a make-specific endpoint before making it widely available to all supported makes. This allowed customers to take advantage of these endpoints and share feedback with Smartcar. Based on the feedback, we realized that these endpoints often required customers to write make-specific code, which is not ideal for a standardized API. These endpoints will be deprecated along with API V2.0. When using make specific endpoints, please ensure to specify the [make](/api-reference/makes) in lower case format. Using upper case letters will result in a PERMISSION error. --- # Source: https://smartcar.com/docs/errors/connect-errors/access-denied.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Access Denied > This error occurs when a user denies your application access to the requested scope of permissions. | Parameter | Required | Description | | ------------------- | -------- | ---------------------------------- | | `error` | `true` | `access_denied` | | `error_description` | `true` | User denied access to application. | ```http Example redirect uri theme={null} HTTP/1.1 302 Found Location: https://example.com/home ?error=access_denied &error_description=User+denied+access+to+application ``` ## Testing To test this error, launch Smartcar Connect in test mode and select “Deny access” on the permissions screen. We recommend handling this error by re-prompting the user to authorize their vehicle and adding a message like in the example below. --- # Source: https://smartcar.com/docs/help/accessing-support-center.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Accessing the Smartcar Support Center > The Smartcar Support Center provides helpful resources including a knowledge base, ticket submission form, AI chat assistant, and a ticket center to manage your requests. This feature is available on paid plans. You can access the Support Center in two ways: ### Option 1: Visit the Support Center directly Go to [support.smartcar.com](https://support.smartcar.com). You’ll be redirected to the Smartcar Dashboard to log in with your Dashboard credentials. ### Option 2: From the Smartcar Dashboard 1. Log in at [dashboard.smartcar.com](https://dashboard.smartcar.com). 2. Click the **Help** icon in the bottom-left corner, or the **Help Hub** icon in the bottom-right. Help Hub 3. Select the **Support Center** option to be redirected to the full Support Center. Support Center Button *** For information about email, changelog, status, and brand reliability subscriptions, see [Subscribing to Smartcar Updates and Notifications](/help/smartcar-updates). --- # Source: https://smartcar.com/docs/getting-started/tutorials/android.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Android Tutorial > In this tutorial, we will use the Android SDK to integrate Connect into your application. Our frontend SDKs handle getting an authorization code representing a vehicle owner's consent for your application to interact with their vehicle for the requested permissions. In order to make requests to a vehicle, please use one of our [backend SDKs](/api-reference/api-sdks). For security, token exchanges and requests to vehicles **should not** be made client side. # Overview
1. The Mobile Application launches a `Chrome Custom Tab` with Smartcar Connect to request access to a user’s vehicle. On Connect, the user logs in with their vehicle credentials and grants the Application access to their vehicle. 2. The `Chrome Tab` is redirected to a specified `REDIRECT_URI` along with an authorization `code`. This will be the custom scheme set on the application. The Smartcar Android receives the authorization `code` in a view listening for the specified custom scheme URI, and passes it to the Mobile Application. 3. The Mobile Application sends the received authorization `code` to the Application’s backend service. 4. The Application sends a request to the Smartcar API. This request contains the authorization code along with the Application’s `CLIENT_ID` and `CLIENT_SECRET`. 5. In response, Smartcar returns an `ACCESS_TOKEN` and a `REFRESH_TOKEN`. 6. Using the `ACCESS_TOKEN`, the Application can now send requests to the Smartcar API. It can access protected resources and send commands to and from the user’s vehicle via the backend service. # Prerequisites * [Sign up](https://dashboard.smartcar.com/signup) for a Smartcar account. * Make a note of your `CLIENT_ID` and `CLIENT_SECRET` from the **Configuration** section on the Dashboard. * Add a custom scheme redirect URI to your application configuration. * Add the `app_server` redirect URI from [Setup step 2.](/getting-started/tutorials/android#setup) to your application configuration. For Android, we require the custom URI scheme to be in the format of `sc` + `clientId` + `://` + `hostname`. For now, you can just set it to `sc` + `clientId` + `://exchange`. Please see our [Connect Docs](/connect/dashboard-config#redirect-uris) for more information. # Setup 1. Clone our repo and install the required dependencies: ```bash theme={null} $git clone https://github.com/smartcar/getting-started-android-sdk.git ``` Do not “checkout from version control” with the Getting Started repo in Android Studio, as it will not open the proper module. 2. Open `getting-started-android-sdk/tutorial` in Android Studio as an existing project and build from existing sources. Android Studio should automatically import the required dependencies and build gradle. We're setting `app_server` to `http://10.0.2.2:8000` to pass the authorization `code` from the [Handle the Response](/getting-started/tutorials/android#handle-the-response) step later on in the tutorial to our backend. ```xml strings.xml theme={null} sc[yourClientId] [yourClientId] http://10.0.2.2:8000 ``` # Build your Connect URL 1. Instantiate a `smartcarAuth` object in the `onCreate` function of the `MainActivity`. ```java MainActivity.java theme={null} // TODO: Authorization Step 1a: Initialize the Smartcar object private static String CLIENT_ID; private static String REDIRECT_URI; private static String[] SCOPE; private SmartcarAuth smartcarAuth; protected void onCreate(Bundle savedInstanceState) { ... // TODO: Authorization Step 1b: Initialize the Smartcar object CLIENT_ID = getString(R.string.client_id); REDIRECT_URI = getString(R.string.smartcar_auth_scheme) + "://" + getString(R.string.smartcar_auth_host); SCOPE = new String[]{"required:read_vehicle_info"}; smartcarAuth = new SmartcarAuth( CLIENT_ID, REDIRECT_URI, SCOPE, true, new SmartcarCallback() { // TODO: Authorization Step 3b: Receive an authorization code } ); } ``` The Android SDK does not support `simulated` mode at this time - only `test` and `live`. Feel free to set `testMode` to `false` where you instantiate your `SmartcarAuth` object to connect to a real vehicle. 2. The Android application will launch a Chrome Tab with Smartcar Connect to request access to a user’s vehicle. On Connect, the user logs in with the username and password for their vehicle’s connected services account and grants the application access to their vehicle. To launch Connect, we can use the `addClickHandler` function that our `smartcarAuth` object has access to. ```java MainActivity.java theme={null} // TODO: Authorization Step 2: Launch Connect smartcarAuth.addClickHandler(appContext, connectButton); ``` # Registering your Custom Scheme Once a user has authorized the application to access their vehicle, the user is redirected to the `REDIRECT_URI` with an authorization `code` as a query parameter. Android applications use custom URI schemes to intercept calls and launch the relevant application. This is defined within the `AndroidManifest`. ```xml AndroidManifest.xml theme={null} ``` # Handle the response Using the Android SDK, the application can receive the code in the `SmartcarCallback` object passed into the `SmartcarAuth` object. ```java MainActivity.java theme={null} smartcarAuth = new SmartcarAuth( CLIENT_ID, REDIRECT_URI, SCOPE, true, new SmartcarCallback() { // TODO: Authorization Step 3b: Receive an authorization code @Override public void handleResponse(final SmartcarResponse smartcarResponse) { Log.i("MainActivity", smartcarResponse.getCode()); // TODO: Request Step 1: Obtain an access token //TODO: Request Step 2: Get vehicle information } } ); ``` # Launching Connect Build your application in Android Studio and click on the **Connect your vehicle** button. This tutorial configures Connect to launch in `test` mode by default. In `test` mode, any `username` and `password` is valid for each brand. Smartcar showcases all the permissions your application is asking for - `read_vehicle_info` in this case. Once you have logged in and accepted the permissions, you should see your authorization `code` printed to your console. # Getting your first access token After receiving the authorization `code`, your iOS application must exchange it for an `ACCESS_TOKEN`. To do so, we can send the code to a backend service. Let’s assume our backend service contains an endpoint `/exchange` that receives an authorization `code` as a query parameter and exchanges it for an `ACCESS_TOKEN`. ```swift ViewController.swift theme={null} // TODO: Obtain an access token public void handleResponse(final SmartcarResponse smartcarResponse) { Log.i("MainActivity", smartcarResponse.getCode()); final OkHttpClient client = new OkHttpClient(); // TODO: Request Step 1: Obtain and access token // Request can not run on the Main Thread // Main Thread is used for UI and therefore can not be blocked new Thread(new Runnable() { @Override public void run() { // send request to exchange the auth code for the access token Request exchangeRequest = new Request.Builder() .url(getString(R.string.app_server) + "/exchange?code=" + smartcarResponse.getCode()) .build(); try { client.newCall(exchangeRequest).execute(); } catch (IOException e) { e.printStackTrace(); } } }).start(); } ``` Notice that our backend service **does not** return the `ACCESS_TOKEN`. This is by design. For security, our frontend should never have access to the `ACCESS_TOKEN` and should always be stored in the backend. # Getting data from a vehicle Once the backend has the `ACCESS_TOKEN`, it can send requests to a vehicle using the Smartcar API. The Android app will have to send a request to the backend service which in turn sends a request to Smartcar. We have to do this because our frontend **does not** have the `ACCESS_TOKEN`. Assuming our backend has a `/vehicle` endpoint that returns the information of a user’s vehicle, we can make this query in our `completion callback` and start another `activity` to show the returned vehicle attributes. ```java MainActivity.java theme={null} public void handleResponse(final SmartcarResponse smartcarResponse) { ... // TODO: Request Step 2: Get vehicle information // send request to retrieve the vehicle info Request infoRequest = new Request.Builder() .url(getString(R.string.app_server) + "/vehicle") .build(); try { Response response = client.newCall(infoRequest).execute(); String jsonBody = response.body().string(); JSONObject JObject = new JSONObject(jsonBody); String make = JObject.getString("make"); String model = JObject.getString("model"); String year = JObject.getString("year"); Intent intent = new Intent(appContext, DisplayInfoActivity.class); intent.putExtra("INFO", make + " " + model + " " + year); startActivity(intent); } catch (IOException e) { e.printStackTrace(); } catch (JSONException e) { e.printStackTrace(); } } ``` # Setting up your backend Now that our frontend is complete, we will need to create a backend service that contains the logic for the `/exchange` and `/vehicle` endpoints. You can use any of our backend SDKs below to set up the service starting from the **Obtaining an Access Token** step. When setting up the environment variables for your backend SDK, make sure to set `REDIRECT_URI` to the custom scheme used for this tutorial i.e. `sc + "clientId" + ://exchange`. --- # Source: https://smartcar.com/docs/api-reference/api-errors.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Errors Overview > A comprehensive breakout of all Smartcar errors. # Connect Errors | Error Type | Error Code | Description | | -------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | | Access Denied | [access\_denied](/errors/connect-errors/access-denied) | This error occurs when a user denies your application access to the requested scope of permissions. | | Invalid Subscription | [invalid\_subscription](/errors/connect-errors/invalid-subscription) | This error occurs when a user’s vehicle is compatible but their connected services subscription is inactive or never activated. | | Configuration Error | [configuration\_error](/errors/connect-errors/configuration-error) | This error occurs when the user has encountered an Error page in Connect and has chosen to return to your application. | | No Vehicles | [no\_vehicles](/errors/connect-errors/no-vehicles) | This error occurs when a vehicle owner has a connected services account, but there are no vehicles associated with the account. | | Vehicle Incompatible | [vehicle\_incompatible](/errors/connect-errors/vehicle-incompatible) | This error occurs when a user tries to authorize an incompatible vehicle in Smartcar Connect. | | Server Error | [server\_error](/errors/connect-errors/server-error) | If there is a server error, the user will return to your application. |
# API Errors API errors are returned from requests made via Smartcar API. Smartcar uses HTTP status codes to indicate success or failure of API requests. This includes: * `2XX`: indicates success * `4XX`: indicates an invalid request (e.g. a required parameter is missing from the request body) * `5XX`: indicates Smartcar-related issues (e.g. a vehicle is not capable of fulfilling a request). ## Error Response All Smartcar errors contain the following fields: | Name | Type | Description | | ----------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | type | string | A unique identifier that groups codes into broad categories of errors | | code | string | A short, descriptive identifier for the error that occurred | | description | string | A short description of the code that provides additional information about the error. The description is always provided in English. | | docURL | string | A link to Smartcar’s doc center guide for the given type and code | | statusCode | number | The HTTP status code | | requestId | string | Smartcar’s request ID | | resolution | object | An object with at least one enumerated property named as "type" that specifies which action can be taken to resolve this error. There are three possible values for the property "type": `RETRY_LATER` - Retry the request at a later time; `REAUTHENTICATE` - Prompt the user to re-authenticate in Smartcar Connect; and `CONTACT_SUPPORT` - Contact Smartcar’s support team. This object could contain other properties depending on the "type" of error. |
| Error Type | Error Code | Status | Description | | ---------------------------- | ----------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `AUTHENTICATION` | [NULL](/errors/api-errors/authentication-errors#null) | 401 | Thrown when there is an issue with your authorization headers. | | `BILLING` | [INVALID\_PLAN](/errors/api-errors/billing-errors#invalid-plan) | 430 | Thrown when limits have been reached based on your plan or if the feature is not available. | | `BILLING` | [VEHICLE\_LIMIT](/errors/api-errors/billing-errors#vehicle-limit) | 430 | Thrown when limits have been reached based on your plan or if the feature is not available. | | `BILLING` | [VEHICLE\_REQUEST\_LIMIT](/errors/api-errors/billing-errors#vehicle-request-limit) | 430 | Thrown when limits have been reached based on your plan or if the feature is not available. | | `BILLING` | [ACCOUNT\_SUSPENDED](/errors/api-errors/billing-errors#account-suspended) | 430 | Thrown when limits have been reached based on your plan or if the feature is not available. | | `COMPATIBILITY` | [MAKE\_NOT\_COMPATIBLE](/errors/api-errors/compatibility-errors#make-not-compatible) | 501 | Thrown when Smartcar does not support a make or feature for a vehicle. | | `COMPATIBILITY` | [SMARTCAR\_NOT\_CAPABLE](/errors/api-errors/compatibility-errors#smartcar-not-capable) | 501 | Thrown when Smartcar does not support a make or feature for a vehicle. | | `COMPATIBILITY` | [VEHICLE\_NOT\_CAPABLE](/errors/api-errors/compatibility-errors#vehicle-not-capable) | 501 | Thrown when Smartcar does not support a make or feature for a vehicle. | | `CONNECTED_SERVICES_ACCOUNT` | [ACCOUNT\_ISSUE](/errors/api-errors/connected-services-account-errors#account-issue) | 400 | Thrown when there are issues with the user's connected service account. | | `CONNECTED_SERVICES_ACCOUNT` | [AUTHENTICATION\_FAILED](/errors/api-errors/connected-services-account-errors#authentication-failed) | 400 | Thrown when there are issues with the user's connected service account. | | `CONNECTED_SERVICES_ACCOUNT` | [NO\_VEHICLES](/errors/api-errors/connected-services-account-errors#no-vehicles) | 400 | Thrown when there are issues with the user's connected service account. | | `CONNECTED_SERVICES_ACCOUNT` | [SUBSCRIPTION](/errors/api-errors/connected-services-account-errors#subscription) | 400 | Thrown when there are issues with the user's connected service account. | | `CONNECTED_SERVICES_ACCOUNT` | [VEHICLE\_MISSING](/errors/api-errors/connected-services-account-errors#vehicle-missing) | 400 | Thrown when there are issues with the user's connected service account. | | `CONNECTED_SERVICES_ACCOUNT` | [PERMISSION](/errors/api-errors/connected-services-account-errors#permission) | 400 | Thrown when there are permission issues with the user's connected service account. | | `CONNECTED_SERVICES_ACCOUNT` | [VIRTUAL\_KEY\_REQUIRED](/errors/api-errors/connected-services-account-errors#virtual-key-required) | 400 | Thrown when a virtual key is required to complete the request. | | `PERMISSION` | [NULL](/errors/api-errors/permission-errors#null) | 403 | Thrown when you make a requests to an endpoint associated with permissions not yet granted to your application. | | `RATE_LIMIT` | [SMARTCAR\_API](/errors/api-errors/rate-limit-errors#smartcar-api) | 429 | Thrown when there is an issue with the frequency of your requests. | | `RATE_LIMIT` | [VEHICLE](/errors/api-errors/rate-limit-errors#vehicle) | 429 | Thrown when there is an issue with the frequency of your requests. | | `RESOURCE_NOT_FOUND` | [PATH](/api-reference/api-errors#resource-errors-path) | 404 | Thrown if the requested path does not exist. | | `RESOURCE_NOT_FOUND` | [VERSION](/api-reference/api-errors#resource-errors-version) | 404 | Thrown if the requested path does not exist. | | `SERVER` | [INTERNAL](/errors/api-errors/server-errors#internal) | 500 | Thrown when Smartcar runs into an unexpected issue and was unable to process the request. | | `SERVER` | [MULTIPLE\_RECORDS\_FOUND](/errors/api-errors/server-errors#multiple-records-found) | 500 | Thrown when multiple records are found but only one was expected. | | `SERVER` | [RECORD\_NOT\_FOUND](/errors/api-errors/server-errors#record-not-found) | 500 | Thrown when a required record could not be found. | | `UPSTREAM` | [INVALID\_DATA](/errors/api-errors/upstream-errors#invalid-data) | 502 | Thrown when the OEM or vehicle failed to process the request. | | `UPSTREAM` | [KNOWN\_ISSUE](/errors/api-errors/upstream-errors#known-issue) | 502 | Thrown when the OEM or vehicle failed to process the request. | | `UPSTREAM` | [NO\_RESPONSE](/errors/api-errors/upstream-errors#no-response) | 502 | Thrown when the OEM or vehicle failed to process the request. | | `UPSTREAM` | [RATE\_LIMIT](/errors/api-errors/upstream-errors#rate-limit) | 502 | Thrown when the OEM or vehicle failed to process the request. | | `UPSTREAM` | [UNKNOWN\_ISSUE](/errors/api-errors/upstream-errors#unknown-issue) | 502 | Thrown when the OEM or vehicle failed to process the request. | | `VALIDATION` | [NULL](/errors/api-errors/validation-errors#null) | 400 | Thrown if there is an issue with the format of the request or body. | | `VALIDATION` | [PARAMETER](/errors/api-errors/validation-errors#parameter) | 400 | Thrown if there is an issue with the format of the request or body. | | `VEHICLE_STATE` | [ASLEEP](/errors/api-errors/vehicle-state-errors#asleep) | 409 | Thrown when a request fails due to the state of a vehicle or logically cannot be completed—for example, you can't retrieve vehicle data because the vehicle is asleep and not responding to network requests. | | `VEHICLE_STATE` | [CHARGING\_IN\_PROGRESS](/errors/api-errors/vehicle-state-errors#charging-in-progress) | 409 | Thrown when a request fails due to the state of a vehicle or logically cannot be completed—for example, you can't unlock the charge port while the vehicle is actively charging. | | `VEHICLE_STATE` | [CHARGING\_PLUG\_NOT\_CONNECTED](/errors/api-errors/vehicle-state-errors#charging-plug-not-connected) | 409 | Thrown when a request fails due to the state of a vehicle or logically cannot be completed—for example, you can't start charging the vehicle if the cable is not plugged in. | | `VEHICLE_STATE` | [DOOR\_OPEN](/errors/api-errors/vehicle-state-errors#door-open) | 409 | Thrown when a request fails due to the state of a vehicle or logically cannot be completed—for example, you can't lock the vehicle if a door is open. | | `VEHICLE_STATE` | [FULLY\_CHARGED](/errors/api-errors/vehicle-state-errors#fully-charged) | 409 | Thrown when a request fails due to the state of a vehicle or logically cannot be completed—for example, you can't start charging because the battery is already fully charged. | | `VEHICLE_STATE` | [NOT\_CHARGING](/errors/api-errors/vehicle-state-errors#not-charging) | 409 | Thrown when a request fails due to the state of a vehicle or logically cannot be completed—for example, you can't stop charging because the vehicle is not currently charging. | | `VEHICLE_STATE` | [CHARGE\_FAULT](/errors/api-errors/vehicle-state-errors#charge-fault) | 409 | Thrown when a request fails due to the state of a vehicle or logically cannot be completed—for example, you can't start charging because the vehicle has detected a charging system fault. | | `VEHICLE_STATE` | [HOOD\_OPEN](/errors/api-errors/vehicle-state-errors#hood-open) | 409 | Thrown when a request fails due to the state of a vehicle or logically cannot be completed—for example, you can't start the engine if the hood is open. | | `VEHICLE_STATE` | [IGNITION\_ON](/errors/api-errors/vehicle-state-errors#ignition-on) | 409 | Thrown when a request fails due to the state of a vehicle or logically cannot be completed—for example, you can't perform certain remote actions while the ignition is on. | | `VEHICLE_STATE` | [IN\_MOTION](/errors/api-errors/vehicle-state-errors#in-motion) | 409 | Thrown when a request fails due to the state of a vehicle or logically cannot be completed—for example, you can't lock the doors while the vehicle is in motion. | | `VEHICLE_STATE` | [REMOTE\_ACCESS\_DISABLED](/errors/api-errors/vehicle-state-errors#remote-access-disabled) | 409 | Thrown when a request fails due to the state of a vehicle or logically cannot be completed—for example, you can't send remote commands because remote access is disabled in the vehicle settings. | | `VEHICLE_STATE` | [TRUNK\_OPEN](/errors/api-errors/vehicle-state-errors#trunk-open) | 409 | Thrown when a request fails due to the state of a vehicle or logically cannot be completed—for example, you can't lock the vehicle if the trunk is open. | | `VEHICLE_STATE` | [UNKNOWN](/errors/api-errors/vehicle-state-errors#unknown) | 409 | Thrown when a request fails due to the state of a vehicle or logically cannot be completed—for example, the vehicle reports an unknown state that prevents the requested action. | | `VEHICLE_STATE` | [UNREACHABLE](/errors/api-errors/vehicle-state-errors#unreachable) | 409 | Thrown when a request fails due to the state of a vehicle or logically cannot be completed—for example, you can't send commands because the vehicle is offline or out of network range. | | `VEHICLE_STATE` | [VEHICLE\_OFFLINE\_FOR\_SERVICE](/errors/api-errors/vehicle-state-errors#vehicle-offline-for-service) | 409 | Thrown when a request fails due to the state of a vehicle or logically cannot be completed—for example, you can't access vehicle data because the vehicle is offline for maintenance or service. | --- # Source: https://smartcar.com/docs/help/api-limits.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Smartcar Usage Limits > Learn about limits you may encounter when using Smartcar. ## Overview There are several types of limits that govern your use of Smartcar. The nature of telematics requires us to carefully manage vehicle connections and traffic to ensure the stability of our platform and those of our upstream providers. There are two major types of limits - **Billing Limits** and **Operational Rate Limits**. # Billing Limits ### [BILLING : VEHICLE\_REQUEST\_LIMIT](/errors/api-errors/billing-errors#vehicle-request-limit) Your Smartcar plan specifies a maximum number of API calls you are permitted to make to each single vehicle in a given month. If you exceed this limit, you will receive the `VEHICLE_REQUEST_LIMIT` error. For example: you have been allocated 500 API calls per vehicle per month, but you made the 501st call to a single vehicle during the billing period. **This limit can be changed.** If you require more calls per vehicle per month, contact [support@smartcar.com](mailto:support@smartcar.com) or your Account Manager and we can work with you to understand your options. ### [BILLING : VEHICLE\_LIMIT](/errors/api-errors/billing-errors#vehicle-request-limit) Your Smartcar plan specifies a maximum number of vehicles that you may have connected at any one time. This limit applies to vehicle connections, and is separate from the limit regarding the number of API calls to those vehicles. If you receive this error, you have exceeded your maximum number of connected vehicles. **This limit can be changed.** Reach out to [support@smartcar.com](mailto:support@smartcar.com) or your Account Manager to discuss your options. # Operational Rate Limits ### [RATE\_LIMIT : SMARTCAR\_API](/errors/api-errors/rate-limit-errors#smartcar-api) Smartcar limits the total number of requests a single application can make over a given period of time to ensure platform stability for all customers. The Smartcar API Limit is defined as a "bucket" of requests that refills at a constant rate over time. The default Smartcar API Limit is a **bucket of 120 requests that refills at a rate of 2 requests per minute.** If you receive a `RATE_LIMIT:SMARTCAR_API` response, your application has exceeded this limit. You should implement an exponential backoff strategy when retrying requests. **This limit can be changed.** Reach out to [support@smartcar.com](mailto:support@smartcar.com) or your Account Manager to discuss your options. ### [RATE\_LIMIT : VEHICLE](/errors/api-errors/rate-limit-errors#vehicle) Sending telematics requests to a vehicle causes it to wake up from its sleep state and consume energy and data resources. Excessive requests to a single vehicle can result in: * EV battery drain * 12 volt battery drain * `UPSTREAM:RATE_LIMIT` errors that prevent you from making requests for a longer period of time Smartcar enforces a per-vehicle rate limit that governs the rate of requests to a single vehicle and mitigates these potential issues. These limits can differ based on the vehicle manufacturer and a number of other factors, and are set by Smartcar to ensure consistent and timely data can be retrieved from vehicles. **This limit cannot be changed.** If you receive this response, refer to the `retry-after` header (returned as seconds) for when to retry the request. ### [UPSTREAM : RATE\_LIMIT](/errors/api-errors/upstream-errors#rate-limit) Vehicle manufacturers sometimes impose rate limits on requests to vehicles. The Smartcar Vehicle Rate Limit will generally prevent those limits from being reached, but outside requests from other providers may cause the upstream limit to be exceeded. If the OEM upstream rate limit is exceeded, you will receive `UPSTREAM:RATE_LIMIT` from the Smartcar API for the affected vehicle until the limit is reset. **This limit cannot be changed.** Smartcar cannot control rate limits imposed by our upstream providers. If you consistently receive this response for a single vehicle, reach out to [support@smartcar.com](mailto:support@smartcar.com) and we can investigate. --- # Source: https://smartcar.com/docs/api-reference/api-sdks.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # SDKs Our backend SDKs simplify the process of making calls to our Vehicle API.
While we provide a number of SDKs for popular languages, you do not need to use an SDK to integrate with our API. Our APIs are just standard HTTP endpoints that can be reached with any HTTP library of your choice. --- # Source: https://smartcar.com/docs/api-reference/application-permissions.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Permissions > Returns a list of the permissions that have been granted to your application in relation to this vehicle. ## Request The vehicle id. ## Response An array of [permissions](/api-reference/permissions). Metadata about the current list of elements. The total number of elements for the entire query (not just the given page). The current start index of the returned list of elements. ```json Example Response theme={null} { "paging": { "count": 25, "offset": 10 }, "permissions": [ "read_vehicle_info" ] } ``` --- # Source: https://smartcar.com/docs/getting-started/how-to/architecture-design.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # How to Design Your Backend Architecture for Smartcar > Learn how to design your backend to integrate your application with Smartcar. Designing your backend architecture for Smartcar integration ensures secure storage of credentials, reliable webhook handling, and a scalable implementation. This guide walks you through the essential database tables and backend endpoints you’ll need. ## What You'll Achieve * Set up database tables to store vehicles, users, and tokens * Create backend endpoints to handle OAuth and webhooks * Understand the data flow between Smartcar and your backend You’ll need tables to track users, vehicles, and Smartcar tokens. Here’s a recommended schema: | Table | Purpose | Key Fields | | ----------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `users` | You probably already have this table to store your app's users | `id`, `email`, `name`, etc. | | `smartcar_tokens` | Stores Smartcar access and refresh tokens pairs with user and vehicle IDs | `id`, `your_app_user_id`, `smartcar_vehicle_id`, `smartcar_access_token`, `smartcar_refresh_token`, `expires_at`, `created_at`, `updated_at` | | `vehicles` | Stores connected vehicle information | `id`, `smartcar_user_id`, `your_app_user_id`, `make`, `model`, `year`, `created_at`, `updated_at` | | `vehicle_data` | Stores data about your vehicles (i.e. odometer readings, location, etc.) | `id`, `smartcar_vehicle_id`, `created_at`, `data_type`, `data_value` | | `webhook_logs` | Log incoming webhook events (optional) | `id`, `smartcar_vehicle_id`, `event_type`, `payload`, `received_at` | Always encrypt tokens at rest and never expose them to the client. Create a backend endpoint to handle the OAuth redirect from Smartcar and exchange the authorization code for tokens. **Example: `/api/smartcar/callback`** 1. Receive the `code` and `state` query parameters from Smartcar. 2. Exchange the code for tokens using Smartcar’s token endpoint. 3. Store the tokens in your `tokens` table, linked to the user and vehicle. ```javascript theme={null} POST https://auth.smartcar.com/oauth/token Content-Type: application/x-www-form-urlencoded client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&grant_type=authorization_code&code=AUTH_CODE&redirect_uri=YOUR_REDIRECT_URI ``` Set up an endpoint to receive webhook POST requests from Smartcar. **Example: `/api/webhooks/smartcar`** * Validate the webhook signature (see [Smartcar webhook docs](/integrations/webhooks)). * Parse the event payload and update your database as needed. * Log the event in `webhook_logs` for auditing and debugging. Want a production-ready AWS implementation? Use the Webhook Receiver Recipe. It includes everything you need to get up and running so you can focus on business logic instead of infrastructure. ```javascript theme={null} // Example Express.js handler app.post('/api/webhooks/smartcar', async (req, res) => { try { // 1. Validate webhook signature const isValid = await validateWebhookSignature(req); if (!isValid) { return res.status(401).send('Invalid signature'); } // 2. Parse event and update database const event = req.body; await processWebhookEvent(event); // 3. Respond with 200 OK res.status(200).send('Received'); } catch (error) { console.error('Error processing webhook:', error); res.status(500).send('Error processing webhook'); } }); ``` * Restrict access to OAuth and webhook endpoints. * Use HTTPS for all traffic. * Never expose access or refresh tokens to the frontend. *** ## What’s Next * [Set up Smartcar Connect](/getting-started/connect-vehicles) * [Configure your webhook integration](/getting-started/integration-overview) --- # Source: https://smartcar.com/docs/integrations/webhooks/best-practices/architecture.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Architecture Patterns > Design patterns for reliable webhook processing The most critical pattern for reliable webhook handling is separating acknowledgment from processing. ## Decouple Receipt from Processing **Return 200 immediately, process asynchronously.** This is the foundation of a reliable webhook integration. Your endpoint receives the POST request from Smartcar Write the raw payload to a queue, database, or object storage Acknowledge receipt with a 200 status code (within 15 seconds) A background worker processes the persisted payload ### Why This Matters * **Prevents timeouts** from slow business logic * **Allows retry of processing** without requesting redelivery * **Enables processing updates** without losing historical events * **Survives outages** in downstream systems ### Implementation Examples ```javascript Node.js (Express + AWS SQS) theme={null} const express = require('express'); const AWS = require('aws-sdk'); const app = express(); const sqs = new AWS.SQS(); app.post('/webhooks/smartcar', async (req, res) => { try { // 1. Get the raw payload const payload = req.body; // 2. Queue for processing await sqs.sendMessage({ QueueUrl: process.env.WEBHOOK_QUEUE_URL, MessageBody: JSON.stringify(payload) }).promise(); // 3. Return immediately res.status(200).json({ status: 'received' }); } catch (error) { console.error('Failed to queue webhook:', error); res.status(500).json({ error: 'Internal error' }); } }); // Separate worker processes the queue async function processWebhook(payload) { const { eventType } = payload; if (eventType === 'VEHICLE_STATE') { await updateVehicleState(payload); } else if (eventType === 'VEHICLE_ERROR') { await handleVehicleError(payload); } } ``` ```python Python (Flask + Redis Queue) theme={null} from flask import Flask, request from rq import Queue from redis import Redis app = Flask(__name__) redis_conn = Redis() queue = Queue(connection=redis_conn) @app.post("/webhooks/smartcar") def webhook_handler(): # 1. Get the raw payload payload = request.get_json() # 2. Queue for processing queue.enqueue(process_webhook, payload) # 3. Return immediately return {"status": "received"}, 200 def process_webhook(payload): # This runs asynchronously in a worker event_type = payload.get("eventType") if event_type == "VEHICLE_STATE": update_vehicle_state(payload) elif event_type == "VEHICLE_ERROR": handle_vehicle_error(payload) ``` ```java Java (Spring Boot + RabbitMQ) theme={null} @RestController public class WebhookController { @Autowired private RabbitTemplate rabbitTemplate; @PostMapping("/webhooks/smartcar") public ResponseEntity> handleWebhook( @RequestBody String payload ) { // 1. Queue for processing rabbitTemplate.convertAndSend( "webhook-queue", payload ); // 2. Return immediately return ResponseEntity.ok( Map.of("status", "received") ); } } @Component public class WebhookProcessor { @RabbitListener(queues = "webhook-queue") public void processWebhook(String payload) { // This runs asynchronously JsonNode json = objectMapper.readTree(payload); String eventType = json.get("eventType").asText(); if ("VEHICLE_STATE".equals(eventType)) { updateVehicleState(json); } else if ("VEHICLE_ERROR".equals(eventType)) { handleVehicleError(json); } } } ``` **Don't do this:** If you perform heavy processing before returning a response, your endpoint may timeout and Smartcar will retry, creating duplicate processing work. ```python Bad Example theme={null} @app.post("/webhooks/smartcar") def webhook_handler(): payload = request.get_json() # DON'T DO THIS: These operations might take too long update_database(payload) call_external_api(payload) send_notifications(payload) # Might timeout before reaching this line return {"status": "received"}, 200 ``` *** ## Production-Ready Pattern For a complete serverless implementation, see the [Webhook Receiver Recipe](/getting-started/tutorials/webhook-receiver-recipe), which provides: * API Gateway for HTTPS endpoint * Lambda function for webhook receipt * SQS queue for async processing * Dead letter queue for failed messages * CloudWatch monitoring and alerts *** ## Next Steps Verify payload signatures Implement idempotency Understand retry policies Deploy serverless infrastructure --- # Source: https://smartcar.com/docs/help/assist-ai-slack.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Assist AI features in Slack > As part of our Enterprise Slack support offering, Smartcar includes access on select Enterprise plans to an AI-powered assistant that can help you get answers quickly, submit tickets, and navigate support resources—all without leaving your Slack workspace. ## 1. Ask a Question In your dedicated Slack support channel, send a message with your question. The AI Agent will attempt to answer it based on Smartcar’s support documentation and past support interactions. Ask a Question ## 2. Submit a Support Ticket If your question requires deeper support, simply click **"Create a Ticket"** at the bottom of the AI-generated response within the Slack channel. This will open a form to submit a formal, trackable support request. Create a Ticket Ticket Form ## 3. View Open Tickets To check the status of an existing ticket, navigate to the Slack thread where the ticket was created and click the **"View Ticket Info"** icon. This will display the current status and details of your support request. View Open Ticket ## 4. Navigate to the Support Center Need more detailed help? You can access your ticket by clicking the **ticket ID** that appears after submitting a request using the **"Create a Ticket"** option. Alternatively, from the **"View Ticket Info"** window, you can click the **ticket number** to be redirected to the Smartcar Developer Dashboard. If you're already logged into an active session, you'll be taken directly to the ticket details within the Support Center. Otherwise, you'll be prompted to log in first. In the Support Center, you can: * Browse our documentation * Submit new support requests * View and update your existing tickets For step-by-step instructions on how to log into the Smartcar Support Center, please see the following article: [Accessing the Smartcar Support Center](/help/accessing-support-center) --- # Source: https://smartcar.com/docs/api-reference/authorization/auth-code-exchange.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Auth Code Exchange > To interact with the Smartcar API, you will need to exchange your authorization code from the [Connect redirect](https://smartcar.com/docs/connect/handle-the-response) for an access token. Check the [overview](https://smartcar.com/docs/api-reference/authorization/overview) page for how to manage your tokens. ## Requesting Access Tokens **Headers** Must be set to `application/x-www-form-urlencoded`, matching the format of the request body. A valid HTTP User Agent value. This value is typically included in the HTTP requests by the client that is making the request. You usually don't have to set this manually. **Body** The authorization code received in the handle response step. This value must be set to `authorization_code` The `redirect_uri` provided in the redirect to Connect step. This value is checked to match the URI sent when the user was directed to Connect. If you launch Connect from a single-page or mobile application, `redirect_uri` **must** match the URI passed in your Connect URL, not the redirect for your backend. ```bash cURL theme={null} curl https://auth.smartcar.com/oauth/token \ -X POST \ -H 'Authorization: Basic base64({client_id}:{client_secret})' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -d 'grant_type=authorization_code&code=35a59c0b-745c-436c-a8a2-7758e718dcb8&redirect_uri=https://example.com/home' ``` ```python Python SDK theme={null} access = client.exchange_code('{code}') ``` ```node Node SDK theme={null} access = client.exchangeCode('{code}');; ``` ```java Java SDK theme={null} Auth access = authClient.exchangeCode("{code}"); ``` ```ruby Ruby SDK theme={null} access = client.exchange_code("{code}") ``` ## Response --- # Source: https://smartcar.com/docs/errors/api-errors/authentication-errors.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Authentication Errors > Thrown when there is an issue with your authorization header. # `NULL` The authorization header is missing or malformed, or it contains invalid or expired authentication credentials (e.g. access token, client ID, client secret). Please check for missing parameters, spelling and casing mistakes, and other syntax issues. ```json theme={null} { "type": "AUTHENTICATION", "code": null, "description": "The authorization header is missing or malformed, or it contains invalid or expired authentication credentials. Please check for missing parameters, spelling and casing mistakes, and other syntax issues.", "docURL": "https://smartcar.com/docs/errors/api-errors/authentication-errors", "statusCode": 401, "requestId": "5dea93a1-3f79-4246-90c5-89610a20471b", "resolution": { "type": null } } ``` ### Suggested Resolution You can resolve this error by referring to our API reference and ensuring that you pass all the parameters as specified. If you are certain that your request is well-formed, please try refreshing your access token. ### Troubleshooting Steps Refer to our API reference and ensure that you use the correct authentication mechanism for your request * Check constants like Bearer and Basic for spelling mistakes. * If you make a request to a vehicle endpoint, verify that your access token grants you access to the correct vehicle. You can do so by making a request to the /vehicles endpoint and ensuring that the correct vehicle ID is included in the returned response. * If you have refreshed your access token, make sure that it persists and that you use your new token to make your request. --- # Source: https://smartcar.com/docs/getting-started/tutorials/backend.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Backend SDK Tutorials > In this tutorial, we will go over how to integrate Connect into your application and make requests to a vehicle using our backend SDKs. # Overview
1. The Application redirects the user to Smartcar Connect to request access to the user’s vehicle. In Connect, the user logs in with their vehicle credentials and grants the Application access to their vehicle. 2. The user’s browser is redirected to a specified `REDIRECT_URI`. The Application Server, which is listening at the `REDIRECT_URI`, will retrieve the authorization code from query parameters sent to the `REDIRECT_URI`. 3. The Application sends a request to the Smartcar API. This request contains the authorization `code` along with the Application’s `CLIENT_ID` and `CLIENT_SECRET`. 4. In response, Smartcar returns an `ACCESS_TOKEN` and a `REFRESH_TOKEN`. 5. Using the `ACCESS_TOKEN`, the Application can now send requests to the Smartcar API. It can access protected resources and send commands to and from the user’s vehicle via the backend service. # Prerequisites * [Sign up](https://dashboard.smartcar.com/signup) for a Smartcar account. * Make a note of your `CLIENT_ID` and `CLIENT_SECRET` from the **Configuration** section on the Dashboard. * Add the following `REDIRECT_URI` to your application configuration: `http://localhost:8000/exchange` # Setup 1. Clone the repo for the SDK you want to use and install the required dependencies: ```bash Node theme={null} $ git clone https://github.com/smartcar/getting-started-express.git $ cd getting-started-express/tutorial $ npm install ``` ```bash Python theme={null} $ git clone https://github.com/smartcar/getting-started-python-sdk.git $ cd getting-started-python-sdk/tutorial $ pip install -r requirements.txt ``` ```bash Java theme={null} $ git clone https://github.com/smartcar/getting-started-java-sdk.git $ cd getting-started-java-sdk/tutorial $ gradlew build ``` ```bash Ruby theme={null} $ git clone https://github.com/smartcar/getting-started-ruby-sdk.git $ cd getting-started-ruby-sdk/tutorial $ bundle install $ ruby app.rb ``` 2. You will also have to set the following environment variables If you've used one of our frontend SDKs to integrate connect, you'll want to set the `SMARTCAR_REDIRECT_URI` environment variable to the URI you used for that application. ```bash theme={null} $export SMARTCAR_CLIENT_ID= $export SMARTCAR_CLIENT_SECRET= $export SMARTCAR_REDIRECT_URI=http://localhost:8000/exchange ``` If you are using Windows, ensure you are appropriately setting environment variables for your shell. Please refer to [this post](https://stackoverflow.com/questions/9249830/how-can-i-set-node-env-production-on-windows/9250168#9250168) which details how to set environment variables on Windows.
# Build your Connect URL 1. Instantiate a `Smartcar` object in the constructor of the App component. ```js index.js theme={null} const client = new smartcar.AuthClient({ mode: 'simulated', }); ``` ```python main.py theme={null} client = smartcar.AuthClient(mode='simulated') ``` ```java Main.java theme={null} String mode = "simulated"; AuthClient client = new AuthClient.Builder() .mode(mode) .build(); ``` ```ruby index.rb theme={null} @@client = Smartcar::AuthClient.new({ mode: 'simulated', }) ``` Feel free to set `mode` to `simulated` or `live` where you instantiate your `Smartcar` object to connect to a simulated or real vehicle. 2. A Server-side rendered application will redirect to Smartcar Connect to request access to a user’s vehicle. On Connect, the user logs in with the username and password for their vehicle’s connected services account and grants the application access to their vehicle. To launch Connect, we need to redirect the user to the appropriate URL. We can make use of the `AUTHORIZATION_URL` function in our Smartcar object and redirect the user to the URL to launch the Connect flow. ```js index.js theme={null} app.get('/login', function(req, res) { const scope = ['read_vehicle_info']; const authUrl = client.getAuthUrl(scope); res.render('home', { url: authUrl, }); }); ``` ```python main.py theme={null} @app.route('/login', methods=['GET']) def login(): scope = ['read_vehicle_info'] auth_url = client.get_auth_url(scope) return redirect(auth_url) ``` ```java Main.java theme={null} get("/login", (req, res) -> { // TODO: Authorization Step 2: Launch Smartcar authentication dialog String[] scope = {"read_odometer"}; String link = client.authUrlBuilder(scope).build(); res.redirect(link); return null; }); ``` ```ruby index.rb theme={null} get "/login" do redirect @@client.get_auth_url(['required:read_vehicle_info']) end ```
# Handle the response Once a user has authorized the application to access their vehicle, the user is redirected to the `REDIRECT_URI` with an authorization `code` as a query parameter. In the previous section, we had set our `REDIRECT_URI` as `localhost:8000/exchange`. Now, our server can be set up as follows to receive the authorization `code`. ```js index.js theme={null} app.get('/exchange', function(req, res) { const code = req.query.code; console.log(code); res.sendStatus(200); }); ``` ```python main.py theme={null} @app.route('/exchange', methods=['GET']) def exchange(): code = request.args.get('code') print(code) return '', 200 ``` ```java Main.java theme={null} get("/exchange", (req, res) -> { String code = req.queryMap("code").value(); System.out.println(code); return ""; }); ``` ```ruby index.rb theme={null} get "/exchange" do code = params[:code] puts code "OK" end ```
# Launching Connect Let’s try authenticating a vehicle! Restart your server, open up your browser and go to `http://localhost:8000/login` ```bash Node theme={null} $node index.js ``` ```bash Python theme={null} $python main.py ``` ```bash Java theme={null} $./gradlew run ``` ```bash Ruby theme={null} $bundle exec ruby app.rb ```
This tutorial configures Connect to launch in `test` mode by default. In `test` mode, any `username` and `password` is valid for each brand. Smartcar showcases all the permissions your application is asking for - `read_vehicle_info` in this case. Once you have logged in and accepted the permissions, you should see your authorization `code` printed to your console.
# Getting your first access token If you've used one of our frontend SDKs to integrate Connect, this is where you'll need to fetch your access token. In the previous section, we retrieved an authorization `code`. The application must exchange the code for an `ACCESS_TOKEN` to make a request. After receiving the ACCESS\_TOKEN, the user can be redirected to the `/vehicle` route. ```js index.js theme={null} // Global variable to save our access_token let access; app.get('/exchange', async function(req, res) { const code = req.query.code; // Access our global variable and store our access tokens. // In a production app you'll want to store this in some // kind of persistent storage access = await client.exchangeCode(code); res.redirect('/vehicle'); }); ``` ```python main.py theme={null} # Global variable to save our access_token access = None @app.route('/exchange', methods=['GET']) def exchange(): code = request.args.get('code') # Access our global variable and store our access tokens. # In a production app you'll want to store this in some # kind of persistent storage global access access = client.exchange_code(code) return redirect('/vehicle') ``` ```java Main.java theme={null} // Global variable to save our access_token private static String access; public static void main(String[] args) { get("/exchange", (req, res) -> { String code = req.queryMap("code").value(); Auth auth = client.exchangeCode(code); // Access our global variable and store our access tokens. // In a production app you'll want to store this in some kind of persistent storage access = auth.getAccessToken(); res.redirect("/vehicle"); return null; }) } ``` ```ruby index.rb theme={null} # Global variable to store the token @@token = '' get "/exchange" do code = params[:code] # Access our global variable and store our access tokens. # In a production app you'll want to store this in # some kind of persistent storage @@token = @@client.exchange_code(code)[:access_token] redirect '/vehicle' end ```
# Getting data from a vehicle 1. Once the backend service or server-side application has the `ACCESS_TOKEN`, it can send requests to a vehicle using the Smartcar API. First we'll need to fetch the `vehicle_id`s associated with the `ACCESS_TOKEN`, then fetch vehicle attributes for one of them. After receiving the `vehicle_attributes` object, we can render it in a simple table on the page. ```js index.js theme={null} app.get('/vehicle', async function(req, res) { // Get the smartcar vehicleIds associated with the access_token const { vehicles } = await smartcar.getVehicles(access.accessToken); // Instantiate the first vehicle in the vehicle id list const vehicle = new smartcar.Vehicle(vehicles[0], access.accessToken); // Make a request to Smartcar API const attributes = await vehicle.attributes(); res.render('vehicle', { info: attributes, }); }); ``` ```python main.py theme={null} @app.route('/vehicle', methods=['GET']) def get_vehicle(): # Access our global variable to retrieve our access tokens global access # Get the smartcar vehicleIds associated with the access_token vehicles = smartcar.get_vehicles(access.access_token) vehicle_ids = vehicles.vehicles # Instantiate the first vehicle in the vehicle id list vehicle = smartcar.Vehicle(vehicle_ids[0], access.access_token) # Make a request to Smartcar API attributes = vehicle.attributes() return jsonify({ "make": attributes.make, "model": attributes.model, "year": attributes.year }) ''' { "make": "TESLA", "model": "Model S", "year": 2014 } ''' ``` ```java Main.java theme={null} get("/vehicle", (req, res) -> { // Get the smartcar vehicleIds associated with the access_token VehicleIds vehiclesResponse = Smartcar.getVehicles(access); String[] vehicleIds = vehiclesResponse.getVehicleIds(); // Instantiate the first vehicle in the vehicle id list Vehicle vehicle = new Vehicle(vehicleIds[0], access); // Make a request to Smartcar API VehicleAttributes attributes = vehicle.attributes(); System.out.println(gson.toJson(attributes)); // { // "id": "36ab27d0-fd9d-4455-823a-ce30af709ffc", // "make": "TESLA", // "model": "Model S", // "year": 2014 // } res.type("application/json"); return gson.toJson(attributes); }) ``` ```ruby index.rb theme={null} get "/vehicle" do code = params[:code] # Get the smartcar vehicleIds associated with the access_token vehicles = Smartcar::Vehicle.get_vehicle(token: @@token) vehicle_ids = vehicles.vehicles # Instantiate the first vehicle in the vehicle id list vehicle = Smartcar::Vehicle.new(token: @@token, id: vehicle_ids.first) # Get the vehicle_attributes object for vehicle vehicle_attributes = vehicle.attributes vehicle_attributes.slice(*%I(id make model year)).to_json end ``` 2. Restart your sever and head back to `http://localhost:8000/login` to go through Connect and make your first API request! ```bash Node theme={null} $node index.js ``` ```bash Python theme={null} $python main.py ``` ```bash Java theme={null} $./gradlew run ``` ```bash Ruby theme={null} $bundle exec ruby app.rb ``` --- # Source: https://smartcar.com/docs/api-reference/batch.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Batch > Returns a list of responses from multiple Smartcar `GET` endpoints, all combined into a single request. The Vehicles API v2.0 will be deprecated by **Q3 of 2026**. We recommend migrating to the [latest version](/api-reference/vehicles-api-intro) as soon as possible to ensure continued support and access to new features. Each endpoint in the batch counts against your [request limit](/errors/api-errors/billing-errors) for a vehicle. ## Request **Path** **Body** An array of requests to make. The Smartcar endpoint to request data from. ## Response The responses from Smartcar. The headers for this response. The unit system to use for the request. The timestamp (ISO-8601 format) of when the returned data was recorded by the vehicle. The HTTP response status code. The Smartcar endpoint to request data from. The response body of this request. The structure of this object will vary by endpoint. See the corresponding endpoint specification. ```json Example Response theme={null} { "responses": [ { "path": "/odometer", "body": { "distance": 37829 }, "code": 200, "headers": { "sc-data-age": "2019-10-24T00:43:46.000Z", "sc-unit-system": "metric" } }, { "path": "/location", "body": { "latitude": 37.4292, "longitude": 122.1381 }, "code": 200, "headers": { "sc-data-age": "2019-10-24T00:43:46.000Z" } } ] } ``` --- # Source: https://smartcar.com/docs/help/beta.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Beta > Understand Smartcar's approach to features in beta. Beta is an option that allows developers to test and integrate new Smartcar features before they are fully released. Beta refers to a phase where certain features are made available for testing and feedback prior to general availability. These features are functional but may still be under development or refinement. ## Benefits of Beta Features Participating in beta allows developers to get a head start on integrating new features, a chance to influence the feature in development through feedback and help Smartcar ensure your app’s needs are met. ## Considerations for features in Beta When working with beta features, keep in mind that features may change before final release. As such, extra caution is advised when using these features in production environments. ## How to Participate If you would like to get involved in testing a beta features, contact your Account Manager or our Support team at [support@smartcar.com](mailto:support@smartcar.com) for guidance. --- # Source: https://smartcar.com/docs/errors/api-errors/billing-errors.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Billing Errors > Thrown when limits have been reached based on your plan, or if the feature is not available. # `VEHICLE_LIMIT` You’ve reached the limit of vehicles in your plan. Please upgrade to unlock access to more vehicles. ```json VEHICLE_LIMIT theme={null} { "type": "BILLING", "code": "VEHICLE_LIMIT", "description": "You’ve reached the limit of vehicles in your plan. Please upgrade to unlock access to more vehicles.", "docURL": "https://smartcar.com/docs/errors/api-errors/billing-errors#vehicle-limit", "statusCode": 430, "requestId": "5dea93a1-3f79-4246-90c5-89610a20471b", "resolution": { "type": "CONTACT_SUPPORT" } } ``` ### Troubleshooting Steps To resolve this error, please [contact us](mailto:support@smartcar.com) to upgrade your plan and increase your vehicle limit. Please note that you won’t be able to make requests to additional vehicles until the end of the current billing period or until you have upgraded your plan. # `INVALID_PLAN` The feature you are trying to use is not included in your current pricing plan. Please visit our pricing page to learn more about our plans and features. ```json INVALID_PLAN theme={null} { "type": "BILLING", "code": "INVALID_PLAN", "description": "The feature you are trying to use is not included in your current pricing plan. Please visit our pricing page to learn more about our plans and features.", "docURL": "https://smartcar.com/docs/errors/api-errors/billing-errors#invalid-plan", "statusCode": 430, "requestId": "5dea93a1-3f79-4246-90c5-89610a20471b", "resolution": { "type": "CONTACT_SUPPORT" } } ``` ### Troubleshooting Steps If you have checked our pricing page and believe that the feature you are trying to use is included in your plan, please [contact us](mailto:support@smartcar.com) and we’ll be happy to assist you. # `VEHICLE_REQUEST_LIMIT` You have exceeded the number of API requests that are allowed for **this** vehicle in the current billing period. Please log in to the [Smartcar dashboard](https://dashboard.smartcar.com/login) and visit the Billing tab to learn more. ```json VEHICLE_REQUEST_LIMIT theme={null} { "type": "BILLING", "code": "VEHICLE_REQUEST_LIMIT", "description": "You have exceeded the number of API requests that are allowed for this vehicle in the current billing period. Please log into the Smartcar dashboard and visit the Billing tab to learn more.", "docURL": "https://smartcar.com/docs/errors/api-errors/billing-errors#vehicle-request-limit", "statusCode": 430, "requestId": "5dea93a1-3f79-4246-90c5-89610a20471b", "resolution": { "type": "CONTACT_SUPPORT" } } ``` ### Troubleshooting Steps To resolve this error, please [contact us](mailto:support@smartcar.com) to upgrade your plan and increase your vehicle limit. Please note that you won’t be able to make additional requests to this vehicle until the end of the current billing period or until you have upgraded your plan. # `ACCOUNT_SUSPENDED` Your Smartcar account is past due and has been suspended. Please reach out to our finance team to resolve this issue. ```json ACCOUNT_SUSPENDED theme={null} { "type": "BILLING", "code": "ACCOUNT_SUSPENDED", "description": "Your Smartcar account is past due and has been suspended. Please reach out to our finance team to resolve this issue.", "docURL": "https://smartcar.com/docs/errors/api-errors/billing-errors#account-suspended", "statusCode": 430, "requestId": "5dea93a1-3f79-4246-90c5-89610a20882a", "resolution": { "type": "FINANCE" } } ``` ### Troubleshooting Steps To resolve this error, please [contact us](mailto:finance@smartcar.com) to pay past due invoices. Please note that you won’t be able to make any requests until you have resolved this issue. --- # Source: https://smartcar.com/docs/help/brand-quirks.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Brand Quirks > Brand specific quirks to keep in mind while building out your application. ## Acura ### Ignition On Depending on model year, certain Acura vehicles do not return data when the ignition/engine is on. ### Sleep State Most Acuras will go into a sleep state after about a week of inactivity, ## Audi ### Primary Key User In order to have access to all vehicle functionality the account that connects to Smartcar will need to be flagged as a Key User by Audi. ## BMW/MINI ### CONNECTED\_SERVICES\_ACCOUNT - SUBSCRIPTION errors Smartcar API will throw a CONNECTED\_SERVICES\_ACCOUNT - SUBSCRIPTION when the data we receive from the vehicle is older than a month as this normally indicates a subscription issue. ## BYD ### Concurrent login requirement BYD accounts can only maintain one active session at a time. Vehicle owners should sign in with a dedicated BYD login for Smartcar that is separate from the credentials used in the BYD mobile app. If the same account signs into the OEM app after connecting through Smartcar, the Smartcar session will be revoked and require re-authentication. If customers reach out about being logged out of their BYD mobile app, we recommend instructing users to create a secondary BYD account exclusively for your app. ## GM (Buick, Chevrolet, Cadillac, GMC) ### VEHICLE\_STATE - ASLEEP errors After 3-4 days of no activity, GM vehicles will enter a deep sleep state at which point they will no longer respond to API requests to preserve their 12v battery. In order to get data from the vehicle again, the car will need to go through an ignition cycle. ### UPSTREAM - RATE\_LIMIT errors In order to avoid hitting UPSTREAM - RATE\_LIMIT errors use batch requests and ping no more than once every 30 minutes. Use of the OEM app also counts towards the rate limit. ## Hyundai/Kia ### Telemetry Update Behavior #### Pre-2025 Models (Gen 2 Navigation) Hyundai/Kia vehicles have event-based logic that sends telemetry updates based on state changes such as: * Every 10% of SoC while charging * 5 minutes after ignition off * Vehicle doors are left unlocked for 5 minutes * After a command successfully completes * Whenever charging stops #### 2025+ Models (Gen 3 / CCnC Navigation) Newer Hyundai/Kia models update more frequently, as often as every five minutes, including while the vehicle is driving. ## Nissan ### “Vehicle has been found” MyNISSAN notifications Vehicle owners may receive a notification from the MyNISSAN app stating “Success! We found the location of your vehicle. Check the map for the location of your YYYY Model.” every time the location endpoint is hit. The app appears to have an option to edit notifications, but as of Feb 2024 they are not available in the app. Notifications may need to be turned off at the iOS/Android level by the vehicle owner. ## PSA Group (Citroen, DS, Opel, Peugeot, Vauxhall) ### Requesting control\_charge permissions If you request control\_charge permissions for PSA EVs, upon login owners will be presented with a PIN and MFA screen in Connect upon submitting their credentials. They will need to have set this up on their OEMs application in order to grant your application this permission. ## Polestar ### Stop charge command limitations Smartcar cannot fulfill stop charge commands if the vehicle is below 40% state of charge due to limitations with the current Polestar APIs. ## Rivian ### MFA If MFA is enabled the vehicle owner will need to re-authorize via Connect about every 2 weeks. ## Tesla ### Remote Access It may take a few hours or up to a full day for the REMOTE\_ACCESS\_DISABLED errors to subside after remote access is enabled. ### Charge Billing Records In order to retrieve charge billing records, the main Tesla account must connect the vehicle, as driver profiles do not have access to this data. ### Virtual Key Tesla now requires virtual keys for 3rd-party applications in order to issue commands for the following models: * All Cybertrucks, Model 3 and Model Y * 2021+ Model S and X Please see [Virtual Keys](/help/oem-integrations/tesla/virtual-key-tesla) for more information. ### Enterprise Tenant Configuration For enterprise customers, Tesla tenant setup must occur **before** any customer-facing Tesla vehicles are onboarded. Configure this during initial implementation, coordinated with Smartcar. Changing Tesla tenant configurations after vehicles are already connected will require all affected users to re-authenticate. See [OEM Migrations and Re-authentication](/connect/re-auth/oem-migrations) for guidance on handling this scenario. ## Volkswagen ### Control charge limits Volkswagen limits charge commands to safeguard battery longevity based on environmental and system conditions. Excessive consecutive requests may result in being temporarily rate limited. To restore functionality, the vehicle must be driven again. ### CONNECTED\_SERVICES\_ACCOUNT errors on lock/unlock commands In addition to verifying the VW account with the activation code, some cars will need to undergo the VW Ident Process before you can access remote lock/unlock functionality. This involves contacting the dealership to verify your ownership of the vehicle. ### Missing Subscription (European VWs) Upon purchasing (or activating the free trial), VW needs to review the request. You will get an email confirmation once they've cleared everything on their side. ### Primary Driver Status In order to fully interact with Smartcar, the credentials need to be flagged as the primary driver. You'll need to tap the "become primary driver" flow in the VW app. Depending on the model, this may require you to be in the car to interact with the infotainment system. A vehicle owner can verify whether or not they are the primary driver by following the steps below: 1. Open the VW mobile app tap the profile icon in the bottom right 2. Go to **Vehicle Management** 3. If there’s an **Additional Users** section, tap their name to see whether it says **Primary User** or **Additional User** ## Volvo ### Lock/unlock commands Volvo is an outlier regarding how unlock requests are processed. After initiating the request, after about 10 seconds you'll need to open the trunk (boot) to successfully complete the request. You'll know the car is ready to unlock the trunk as the hazard lights will flash. We recommend adding a notification for Volvos as part of the request loading animation to inform the user of this process. ### Phone number username Smartcar Connect currently checks for an email format, as such phone number usernames cannot be used. The owner will need to add their email to their Volvo account via the web portal. ### Compatibility Some models are not compatible because the device needs to be physically in the vehicle during authentication, which Connect doesn’t support at the moment: * 2021+: XC40 Recharge * 2022+: S90, S90 Recharge, V90, V90 Recharge, V90 Cross Country, XC60, XC60 Recharge, C40 Recharge * 2023+: All models with the exception of the XC40 Even if the vehicle has been connected to and shows up in the Volvo app, if they go through Connect the account will present as if there are no vehicles on the account. --- # Source: https://smartcar.com/docs/help/brand-subscriptions.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Brand Subscription Information > Below you can find the connected service name for each brand as well as any specific subscription packages needed to connect to the vehicle via Smartcar. | Make | Region | Connected Service | Package | Subscription Cost | | --------------------------- | --------------------------- | ------------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | | Acura | US, Canada | ACURALINK | Remote | 3 year free trial (2023 and Newer Models), 6 month free trial (2022 and Older Models). \$110/year thereafter. | | Alfa Romeo | US, Europe | My Alfa Connect | My Car and My Remote | 3 - 5 years included. | | Audi | US | myAudi | CARE | - | | | Europe, Canada | Audi Connect | Remote | Free for three years after delivery of a new vehicle. \~£120/year thereafter. | | BMW | All | BMW Connected | - | Free trial varies with model year. \~\$120/year thereafter. | | Buick | US, Canada | OnStar | Remote Access | Free trial varies with model year. \$14.99/month for standalone Remote Access package. | | BYD | Europe | BYD (Connected Services) | - | - | | Cadillac | US, Canada | OnStar | Remote Access | Free trial varies with model year. \$14.99/month for standalone Remote Access package. | | Chevrolet | US, Canada | OnStar | Remote Access | Free trial varies with model year. \$14.99/month for standalone Remote Access package. | | Chrysler | US, Canada | Uconnect | Sirius XM Guardian (Remote Package) | 1 year free trial. \$12.99/month for the Remote Package thereafter. | | Citroën | Europe | My Citroën | ë-remote services needed for remote commands | - | | CUPRA | Europe | CUPRA CONNECT | Remote Access Services | 3 years free for the Born model, 1 year free for others. Price varies with region. | | Dacia | Europe | My Dacia | - | | | Dodge | US, Canada | Uconnect | Sirius XM Guardian (Remote Package) | 1 year free trial. \$12.99/month for the Remote Package thereafter. | | DS | Europe | MyDS | E-TENSE Remote | - | | Fiat | Europe | FIAT | My Car and My Remote | 6 month free trial. | | | US | FIAT Connect | Assistance Package | 3 month free trial with select vehicles. \$14.99/month. | | Ford | All | FordPass | - | - | | GMC | US, Canada | OnStar | Remote Access | Free trial varies with model year. \$14.99/month for standalone Remote Access package. | | Honda | US | HondaLink | EV Access for EV Data. Remote Access for Commands | EV Access 8 year trial. \$14.99/month for standalone Remote Access package. | | Hyundai | All | Hyundai BlueLink | - | 3 year free trial for new vehicles. \$9.90/month per package thereafter. | | | US | Hyundai BlueLink (2023 IONIQ 6 & all 2024+) | BlueLink+ | - | | Infiniti | US | MyINFINITI | - | 1 year free trial. \$12.99/month thereafter. | | Jaguar | All | Jaguar InControl | - | 3 year free trial. \~\$100/year thereafter. | | Jeep | US, Canada | Uconnect | Sirius XM Guardian (Remote Package) | 1 year free trial. \$12.99/month for the Remote Package thereafter. | | | US, Canada | Jeep Connect | Sirius XM Guardian (Remote Package) | 1 year free trial. \$12.99/month for the Remote Package thereafter. | | Kia | US, Canada | Kia Access | Plus | 1 year free trial. \$149/year thereafter. | | | Europe | Kia Connect | - | 7 year free trial starting on sale to the first owner. | | Land Rover | All | Land Rover InControl | - | 3 year free trial. \~\$100/year thereafter. | | Lexus | US, Canada | Lexus Enform | REMOTE | Free trial up to 3 years, varies with model year. \$80/year thereafter. | | Lincoln | US | Lincoln Way | - | - | | Mazda | US, Europe | MyMazda | - | 3 year free trial. \$10/month thereafter. | | Mercedes | All | MeConnect | - | 1 year free trial. \~\$15/year there after. | | Mini | All | Mini Connected | - | Free trial varies with model year. \~\$120/year thereafter. | | Nissan | US | NissanConnect Services | - Convenience - Select (EV data) | Free trial varies with model year. $9.99 - $ 21.98/month thereafter. | | | Europe | NissanConnect | - | Free trial varies with model year. \~£1.99/month thereafter. | | Opel | Europe | myOpel | e-Remote services needed for remote commands | - | | Peugeot | Europe | MYPEUGEOT | E-REMOTE CONTROL needed for remote commands | - | | Polestar | All | Polestar | - | Included (no separate paid Remote package required). | | Porsche | US, Europe | My Porsche | | 1 year free trial after initial purchase. \$299/year there after. | | RAM | US, Canada | Uconnect | Sirius XM Guardian (Remote Package) | 1 year free trial. \$12.99/month for the Remote Package thereafter. | | | US, Canada | Ram Connect | Sirius XM Guardian (Remote Package) | 1 year free trial. \$12.99/month for the Remote Package thereafter. | | Renault | Europe | My Renault | - | - | | Rivian | US | Rivian | - | - | | Skoda | Europe | MySKODA | Care Connect | \~£36/year. | | Subaru (excluding Solterra) | US | MySubaru | STARLINK Security Plus | 6-month free trial. \$4.95/month thereafter. | | Subaru Solterra | US | Solterra Connect | Remote Connect | One-year trial included, \$8/month after trial. | | Tesla | All | Tesla | - | - | | Toyota | US, Canada | Toyota Connected Services | Remote Connect | 1 year free trial. \$80/year thereafter. | | Vauxhall | Europe | myVauxhall | e-Remote services needed for remote commands | - | | Volkswagen | US | Car-Net | Remote Access | - | | | Europe (non-ID) 2018 - 2022 | Car-Net | - | - | | | Europe (non-ID) ≤ 2023 | We Connect | - | - | | | Europe (non-ID) 2024+ | VW Connect | - | - | | | Europe (ID) Firmware \<3 | We Connect Start | - | - | | | Europe (ID) Firmware v3+ | We Connect ID | - | - | | Volvo | All | Volvo Cars | - | Free trial varies with model year. \~\$200/year thereafter. | ## Notes ### Audi * Owners will need to ensure they're the Primary or Key user for the vehicle connected to their account in order to access all Smartcar functionality. ### Ford and Lincoln * Owners that use a username to login to their connected services app will need to migrate to using their email address under account settings in their Ford Pass or Lincoln Way portal. ### OnStar * Chevy Bolts MY 2020+ come with the **EV Mobile Command** service included for 5 years with the purchase of a new vehicle. Location data is not included in the package. Bolt owners will need to also subscribe to **Remote Access** to be able to get access to location data. * For all other OnStar accounts, we require the modern **Remote Access** plan as our base subscription. This plan comes with the **Vehicle Status** feature set, which is what enables our remote access to data from cars. More information can be found [in this PDF](https://my.chevrolet.com/content/dam/gmownercenter/gmna/dynamic/onstar/comparePlans/nbm/OC_Compare-Plans-Chevy.pdf). * There are certain legacy OnStar accounts floating around with similar names. A good check on whether a customer has the correct plan or not is the ability to view vehicle information like fuel level, EV battery level, odometer, or tire pressure from within their vehicle’s mobile app. ### Nissan US * Convenience features are included as part of the Premium package. ### Toyota * The Remote Connect subscription is tied to the audio package purchased with the vehicle. Compatible audio package availability is determined based on the trim of the vehicle model and varies model year to model year. Toyota provides PDFs for Remote Connect availability [here](https://www.toyota.com/connected-services/#:~:text=Learn%20about%20your%20Connected%20Services). ### Uconnect * For all Uconnect accounts, we require the ability to interact with vehicle information through the Uconnect portal * A Uconnect account may have access to Mopar, but not all Mopar accounts have access to Uconnect. If a user can see information in Mopar but not Uconnect, they'll need to reach out to Uconnect support to set up the right Uconnect plan for their vehicle. * 2021+ Jeeps have their own connected service - Jeep Connect * 2022+ Rams have their own connected service - Ram Connect * 2022+ Jeep Wagoneers have their own connected service - Wagoneer Connect * Canada has limited support listed [here](https://www.driveuconnect.ca/en/sirius-xm-guardian-vehicles) ### Volkswagen ID Series * Model year 2021 and certain 2022 Volkswagen ID vehicles require an upgrade to vehicle software version 3 which will allow you to get location and odometer data. This is a requirement for both US and European vehicles. ### Volvo The following models are not currently compatible with Smartcar: * 2021+ : XC40 Recharge * 2022+ : S90, S90 Recharge, V90, V90 Recharge, V90 Cross Country, XC60, XC60 Recharge * 2023+ : All models with the exception of the XC40 --- # Source: https://smartcar.com/docs/api-reference/compatibility/by-region-and-make.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # By Region and Make > Compatibility will vary by model, year, and trim. This API is for reference purposes only and it showcases vehicle makes and models that may be compatible with Smartcar and it does not guarantee that a specific vehicle will be compatible. The Compatibility API is an Enterprise feature. Please [contact us](https://smartcar.com/pricing/) to upgrade your plan. Compatibility by region and make allows developers to query the latest version of our Compatibility Matrix based on region, engine type, make, and permission. ## Request **Headers** **Query** One of the following regions: `US`, `CA` or `EUROPE` Queries for all engine types if none are specified. A space-separated list of [makes](/api-reference/makes). This field is optional. If no make is specified, all makes will be returned. A space-separated list of [permissions](/api-reference/permissions). Queries for all permissions if none are specified. ```bash cURL theme={null} curl --request GET \ --url 'https://api.smartcar.com/v2.0/compatibility/matrix?region=US&type=BEV&make=tesla&scope=read_battery%20read_charge' \ --header 'Authorization: Basic bXktY2xpZW50LWlkOm15LWNsaWVudC1zZWNyZXQ=' ``` ```javascript JavaScript theme={null} const response = await fetch('https://api.smartcar.com/v2.0/compatibility/matrix?region=US&type=BEV&make=tesla&scope=read_battery%20read_charge', { method: 'GET', headers: { 'Authorization': 'Basic bXktY2xpZW50LWlkOm15LWNsaWVudC1zZWNyZXQ=' } }); const data = await response.json(); ``` ```python Python theme={null} import requests url = "https://api.smartcar.com/v2.0/compatibility/matrix" params = { "region": "US", "type": "BEV", "make": "tesla", "scope": "read_battery read_charge" } headers = { "Authorization": "Basic bXktY2xpZW50LWlkOm15LWNsaWVudC1zZWNyZXQ=" } response = requests.get(url, params=params, headers=headers) data = response.json() ``` ## Response An array of models supported for the given `make`. `model` for the given `make`. The earliest model year supported by Smartcar. The latest model year supported by Smartcar. Engine type for the given `model`. An array of endpoints supported for the given `model`. An array of `permissions` supported for the given `model`. ```json Example Response theme={null} { "NISSAN": [ { "model": "LEAF", "startYear": 2018, "endYear": 2022, "type": "BEV", "endpoints": [ "EV battery", "EV charging status", "Location", "Lock & unlock", "Odometer" ], "permissions": [ "read_battery", "read_charge", "read_location", "control_security", "read_odometer" ] } ], "TESLA": [ { "model": "3", "startYear": 2017, "endYear": 2023, "type": "BEV", "endpoints": [ "EV battery", "EV charging status", "EV start & stop charge", "Location", "Lock & unlock", "Odometer", "Tire pressure" ], "permissions": [ "read_battery", "read_charge", "control_charge", "read_location", "control_security", "read_odometer", "read_tires" ] } ] } ``` --- # Source: https://smartcar.com/docs/api-reference/compatibility/by-vin.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # By VIN > Compatibility will vary by model, year, and trim. This API is for reference purposes only and it showcases vehicle makes and models that may be compatible with Smartcar and it does not guarantee that a specific vehicle will be compatible. The Compatibility API is an Enterprise feature. Please [contact us](https://smartcar.com/pricing/) to upgrade your plan. Compatibility by VIN allows developers to determine if a specific vehicle could be compatible with Smartcar. A vehicle is capable of a given feature if: 1. The vehicle supports the feature (e.g., a Ford Escape supports /fuel but a Mustang Mach-e does not) 2. Smartcar supports the feature for the vehicle's make This endpoint only supports checking capabilities for vehicles sold in the United States. It **does not** support checking `capabilities` for VINs in Canada and Europe. ## Request **Headers** **Parameters** The VIN (Vehicle Identification Number) of the vehicle. A space-separated list of permissions. An optional country code string according to ISO 3166-1 alpha-2. ## Response `true` if the vehicle is likely compatible, `false` otherwise. One of the reasons described below if compatible is `false`, `null` otherwise The vehicle does not have the hardware required for internet connectivity Smartcar is not yet compatible with the vehicle's make in the specified country An array containing capability objects for the set of endpoints that the provided scope value can provide authorization for. This array will be empty if `compatible` is `false`. One of the permissions provided in the scope parameter One of the endpoints that the permission authorizes access to `true` if the vehicle is likely capable of this feature, `false` otherwise One of the reasons described below if capable is `false`, `null` otherwise The vehicle does not support this feature Smartcar is not capable of supporting the given feature on the vehicle's make ```json Example Response theme={null} { "compatible": true, "reason": null, "capabilities": [ { "capable": false, "endpoint": "/engine/oil", "permission": "read_engine_oil", "reason": "SMARTCAR_NOT_CAPABLE" }, { "capable": true, "endpoint": "/battery", "permission": "read_battery", "reason": null }, { "capable": true, "endpoint": "/battery/capacity", "permission": "read_battery", "reason": null }, { "capable": true, "endpoint": "/vin", "permission": "read_vin", "reason": null } ] } ``` A vehicle's compatibility depends on many factors such as its make, model, model year, trim, etc. The API optimizes returning false positives. --- # Source: https://smartcar.com/docs/integrations/webhooks/callback-verification.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Callback URI Verification > Verify your webhook endpoint can receive deliveries **This page covers initial endpoint verification.** For verifying webhook payload signatures from vehicles, see [Payload Verification](/integrations/webhooks/payload-verification). When you create a webhook or update a callback URI in the Smartcar Dashboard, Smartcar sends a one-time `VERIFY` event to confirm your endpoint is ready. Your endpoint must respond correctly before Smartcar will deliver any vehicle data. ## The VERIFY Event Smartcar sends a challenge request to your callback URI in this format: ```json Version 4.0 (NEW) theme={null} { "eventId": "52f6e0bb-1369-45da-a61c-9e67d092d6db", "eventType": "VERIFY", "data": { "challenge": "" }, "meta": { "version": "4.0", "webhookId": "5a8e5e38-1e12-4011-a36d-56f120053f9e", "webhookName": "Example Webhook", "deliveryId": "5d569643-3a47-4cd1-a3ec-db5fc1f6f03b", "deliveredAt": "2025-07-31T19:38:42.332Z" } } ``` ```json Version 2.0 theme={null} { "version": "2.0", "webhookId": "", "eventName": "verify", "payload": { "challenge": "" } } ``` ## Required Response Your endpoint must respond with: 1. **Status code**: `200 OK` 2. **Content-Type header**: `application/json` 3. **Response body**: A JSON object containing the HMAC-SHA256 hash of the challenge ### Generate the HMAC Create an HMAC-SHA256 hash of the `challenge` string using your **Application Management Token** as the secret key: Our [backend SDKs](/api-reference/api-sdks) have helper methods to generate the HMAC. ```js Node theme={null} let hmac = smartcar.hashChallenge( application_management_token, payload.challenge ); ``` ```python Python theme={null} hmac = smartcar.hash_challenge( application_management_token, payload.challenge ) ``` ```java Java theme={null} String hmac = Smartcar.hashChallenge( application_management_token, payload.challenge ); ``` ```ruby Ruby theme={null} hmac = Smartcar.hash_challenge( application_management_token, payload.challenge ) ``` ### Return the Response Return the hex-encoded hash in your response body with the key `challenge`: ```json Response Body theme={null} { "challenge": "{HMAC-hex-string}" } ``` If your endpoint fails to respond correctly within 15 seconds, Smartcar will not activate the webhook. You can retry verification from the Dashboard at any time. *** ## Verify webhook challenges inside the Dashboard Use the Smartcar Dashboard to understand exactly what Smartcar expects before you enable webhooks in production. The **Verify webhook** modal shows a sample challenge string plus language-specific snippets so you can implement the same HMAC signature in your code. Copy the challenge string from the modal and use the embedded snippets (Python, Node, Java, or Ruby) as references while you code the signature logic on your server. Run your handler locally or in staging so it is ready to answer Smartcar’s challenge. Once your server is ready, click **Verify this webhook**. Smartcar sends the challenge payload to your callback URL, and your code responds with the signature it just produced. The Response tab displays the HTTP status, the challenge Smartcar sent, the signature Smartcar expected, and the body your server returned. Use this side-by-side view to confirm success or adjust your implementation before retrying. --- # Source: https://smartcar.com/docs/api-reference/signals/charge.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Charge Signals ### Amperage Signal code: `charge-amperage` Current amperage flowing to the electric vehicle during a charging session, measured in amps. ```json Example theme={null} { "unit": "ampere", "value": 32 } ``` ### Max Amperage Signal code: `charge-amperagemax` The maximum available amps available to charge. ```json Example theme={null} { "unit": "ampere", "value": 48 } ``` ### Amperage Requested Signal code: `charge-amperagerequested` The requested amps to charge the vehicle. ```json Example theme={null} { "unit": "ampere", "value": 32 } ``` ### Charge Limits Signal code: `charge-chargelimits` Object containing the default (global) charge limit configuration and configurations based on location, and charge connector type Array of charge limit configurations, each representing a different context (global, location-based, or connector-based). The type of charge limit configuration. "global" applies universally, "location" is specific to a location, and "connector" is specific to a charging connector type. **Possible values:** `GLOBAL`, `LOCATION`, `CONNECTOR` The maximum state of charge (SoC) limit configured for this context, expressed as a percentage (0-100). Additional context for location or connector-based charge limits. Null for global configurations. Name of the location or charging station where this limit applies. Street address of the location where this limit applies. Geographic latitude coordinate of the location where this limit applies. Geographic longitude coordinate of the location where this limit applies. Type of charging connector where this limit applies (only used when type is "connector"). Maximum state of charge (SoC) limit currently being applied to the vehicle, expressed as a percentage (0-100). This field will contain a numeric value when the vehicle is plugged in and charging, indicating which of the configured charge limits is currently active. When the vehicle is not plugged in or the active limit cannot be determined, this field will be null. The unit of measurement for the charge limits. ```json Example theme={null} { "values": [ { "type": "global", "limit": 80, "condition": null }, { "type": "location", "limit": 90, "condition": { "name": "Home", "address": "123 Main St", "latitude": 37.7749, "longitude": -122.4194 } } ], "activeLimit": 100, "unit": "percent" } ``` ### Charge Port Status Color Signal code: `charge-chargeportstatuscolor` Current status indicator color displayed on or around the vehicle's charging port. **Possible values:** `GREEN`, `BLUE`, `ORANGE`, `ETC` ```json Example theme={null} { "value": "GREEN" } ``` ### Charge Rate Signal code: `charge-chargerate` Current rate at which range is being added to the vehicle during an active charging session ```json Example theme={null} { "unit": "km/h", "value": 25 } ``` ### Records Signal code: `charge-chargerecords` Collection of historical charging session data stored by the vehicle. Array of individual charging session records, each representing a completed or ongoing charging event. Unique OEM identifier assigned to the specific charging session. Detailed breakdown of the charging session costs. Three-letter currency code (e.g., "USD", "EUR") representing the monetary unit used for the charging session transaction. Cost specifically for the electrical energy consumed during the charging session. Additional non-energy related charges (e.g., connection fees, parking fees) associated with the charging session. ISO-8601 timestamp marking when a charging session was completed or terminated. Details about where the charging session took place. Descriptive name of the charging location (e.g., "Home Charger", "Public Station 123"). Street address of the charging location. Geographic latitude coordinate of the charging location. Geographic longitude coordinate of the charging location. ISO-8601 timestamp marking when a charging session was initiated. Total amount of electrical energy delivered during the charging session, measured in kilowatt-hours (kWh). Identifier for the type of charging connector used (e.g., "J1772", "CCS", "CHAdeMO"). Indicates whether the charging occurred at a public charging station (true) or private location (false). Battery's state of charge (0-100%) at the end of the charging session. Battery's state of charge (0-100%) at the start of the charging session. ```json Example theme={null} { "values": [ { "id": "CHG123", "cost": { "currency": "USD", "otherAmount": 2, "energyAmount": 10.5 }, "endTime": "2023-10-15T08:00:00Z", "location": { "name": "Home Charger", "address": "123 Main St", "latitude": 37.7749, "longitude": -122.4194 }, "startTime": "2023-10-15T00:00:00Z", "energyAdded": 40.5, "connectorType": "J1772", "isPublicCharger": false, "endStateOfCharge": 90, "startStateOfCharge": 20 } ] } ``` ### Charge Timers Signal code: `charge-chargetimers` Object containing the default (global) charge timer configuration and configurations based on location, and charge connector type Array of charging timer configurations, each defining either scheduled charging times or departure times. The type of charging timer configuration. "global" applies universally, "location" is specific to a location, and "connector" is specific to a charging connector type. **Possible values:** `GLOBAL`, `LOCATION`, `CONNECTOR` Additional context for location or connector-based charging timers. Null for global configurations. Name of the location or charging station where this timer configuration applies. Street address of the location where this timer configuration applies. Geographic latitude coordinate of the location where this timer configuration applies. Geographic longitude coordinate of the location where this timer configuration applies. Type of charging connector where this timer configuration applies (only used when type is "connector"). Array of time windows during which charging should occur, defined by start and end times on specific days. The time when the charging window should end, in 24-hour format (HH:MM:SS). List of days of the week when this charging schedule should be active. The time when the charging window should begin, in 24-hour format (HH:MM:SS). Array of target departure times when the vehicle should be charged and ready to use. List of days of the week when this departure timer should be active. The target time when the vehicle should be fully charged and ready, in 24-hour format (HH:MM:SS). Indicates whether the vehicle manufacturer's smart charging optimization features are enabled for this timer configuration. ### Charger Phases Signal code: `charge-chargerphases` The number of phases available from the connected charger. ```json Example theme={null} { "value": 3 } ``` ### Charging Connector Type Signal code: `charge-chargingconnectortype` Identifier for the type of charging connector/inlet equipped on the vehicle. ```json Example theme={null} { "value": "J1772" } ``` ### Detailed Charging Status Signal code: `charge-detailedchargingstatus` String value that provides detailed information about the current state of the charging process. **Possible values:** `CHARGING`, `NOT_CHARGING`, `FULLY_CHARGED` ```json Example theme={null} { "value": "CHARGING" } ``` ### Energy Added Signal code: `charge-energyadded` Cumulative amount of electrical energy delivered to the vehicle during the current or most recent charging session, measured in kilowatt-hours (kWh). ```json Example theme={null} { "unit": "kWh", "value": 25.5 } ``` ### Fast Charger Type Signal code: `charge-fastchargertype` Identifier for the specific DC fast charging standard currently connected to the vehicle. Indicates the protocol being used for high-power charging ```json Example theme={null} { "value": "CCS" } ``` ### Is Charging Signal code: `charge-ischarging` Boolean indicator that shows whether the electric vehicle is actively receiving power from a charging station or outlet. ```json Example theme={null} { "value": true } ``` ### Is Charging Cable Connected Signal code: `charge-ischargingcableconnected` Boolean indicator that shows whether a charging cable is physically connected to the vehicle's charging port. ```json Example theme={null} { "value": true } ``` ### Is Charging Cable Latched Signal code: `charge-ischargingcablelatched` Boolean indicator that shows whether the charging cable is securely locked to the vehicle's charging port. ```json Example theme={null} { "value": true } ``` ### Is Charging Port Flap Open Signal code: `charge-ischargingportflapopen` Boolean indicator that shows whether the vehicle's charging port access door or flap is currently open. ```json Example theme={null} { "value": true } ``` ### Is Fast Charger Present Signal code: `charge-isfastchargerpresent` Boolean indicator that shows whether the vehicle is connected to a DC fast charging station. ```json Example theme={null} { "value": true } ``` ### Time To Complete Signal code: `charge-timetocomplete` Estimated time remaining until the charging session reaches the activeLimit in minutes. ```json Example theme={null} { "value": 45 } ``` ### Voltage Signal code: `charge-voltage` Current voltage level being supplied to the electric vehicle during a charging session, measured in volts. ```json Example theme={null} { "unit": "volts", "value": 240 } ``` ### Wattage Signal code: `charge-wattage` Current power delivery rate to the electric vehicle during a charging session, measured in watts. ```json Example theme={null} { "unit": "watts", "value": 250 } ``` --- # Source: https://smartcar.com/docs/api-reference/tesla/clear-pin-to-drive.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Clear PIN to Drive > Disables this feature on the vehicle and resets the PIN. ## Permission `control_pin` ## Request **Path** ```bash cURL theme={null} curl "https://api.smartcar.com/v2.0/vehicles/{id}/{make}/pin" \ -H "Authorization: Bearer {token}" \ -X "DELETE" \ -H "Content-Type: application/json" \ ``` ```python Python theme={null} pin = vehicle.request( "DELETE", "{make}/pin" ) ``` ```js Node theme={null} const pin = vehicle.request( "DELETE", "{make}/pin" ); ``` ```java Java theme={null} SmartcarVehicleRequest request = new SmartcarVehicleRequest.Builder() .method("DELETE") .path("{make}/pin") .build(); VehicleResponse pin = vehicle.request(request); ``` ```ruby Ruby theme={null} pin = vehicle.request( "DELETE", "{make}/pin" ) ``` ## Response If the request is successful, Smartcar will return “success”. If the request is successful, Smartcar will return a message. ```json Example Response theme={null} { "message": "Successfully sent request to vehicle", "status": "success" } ``` ## Notes * Call `POST` [PIN to Drive](/api-reference/tesla/set-pin-to-drive) in order to enable this feature and set the PIN * Currently both owner and driver account types can clear a PIN for the vehicle and disable the feature via the API. --- # Source: https://smartcar.com/docs/api-reference/signals/climate.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Climate Signals ### External Temperature Signal code: `climate-externaltemperature` The current temperature measured outside the vehicle. The unit of temperature measurement (celsius or fahrenheit) The temperature value ```json Example theme={null} { "unit": "celsius", "value": 22.5 } ``` ### Internal Temperature Signal code: `climate-internaltemperature` The current temperature measured inside the vehicle's cabin. The unit of temperature measurement (celsius or fahrenheit) The temperature value ```json Example theme={null} { "unit": "celsius", "value": 21.5 } ``` --- # Source: https://smartcar.com/docs/api-reference/signals/closure.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Closure Signals ### Doors Signal code: `closure-doors` An object containing information about the vehicle's doors. An array of objects containing information about the state of the vehicle's doors. Represents the row position of a specific door, front to back (0 to Doors.rowCount-1). Represents the column position of a specific door, left to right (0 to Door.ColumnCount-1). Indicates if the door is open. Indicates if the door is locked. Indicates the total number of door rows present in the vehicle. This field, along with columnCount, provides information about the vehicle's door layout and the total number of doors available. Indicates the total number of door columns present in the vehicle. This field, along with rowCount, provides information about the vehicle's door layout and the total number of doors available. ```json Example theme={null} { "values": [ { "row": 0, "column": 0, "isOpen": false, "isLocked": true }, { "row": 0, "column": 1, "isOpen": false, "isLocked": true } ], "rowCount": 2, "columnCount": 2 } ``` ### Engine Cover Signal code: `closure-enginecover` An object containing information about the state of the vehicle's engine cover for ICE or PHEV vehicles. Indicates if the trunk is open. ### Front Trunk Signal code: `closure-fronttrunk` An object containing information about the state of the vehicle's front trunk. Indicates if the trunk is open. Indicates if the trunk is locked. ### Is Locked Signal code: `closure-islocked` A boolean value indicating whether the vehicle's closures are currently locked. ### Rear Trunk Signal code: `closure-reartrunk` An object containing information about the state of the vehicle's rear trunk. Indicates if the trunk is open. Indicates if the trunk is locked. ### Sunroof Signal code: `closure-sunroof` An object containing information about the state of the vehicle's sunroof. Indicates if the trunk is open. ### Windows Signal code: `closure-windows` An object containing information about the vehicle's windows. An array of objects, where each object represents a specific window in the vehicle. Represents the row position of a specific window, front to back (0 to Windows.rowCount-1). Represents the column position of a specific window, left to right (0 to Windows.columnCount-1). Indicates if the window is open. Indicates the total number of window rows present in the vehicle. This field, along with columnCount, provides information about the vehicle's window layout and the total number of windows available. Indicates the total number of window columns present in the vehicle. This field, along with rowCount, provides information about the vehicle's window layout and the total number of windows available. ```json Example theme={null} { "values": [ { "row": 0, "column": 0, "isOpen": false }, { "row": 0, "column": 1, "isOpen": false } ], "rowCount": 2, "columnCount": 2 } ``` --- # Source: https://smartcar.com/docs/api-reference/compatibility-api-intro.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Compatibility API Overview > The Compatibility API helps you determine if a specific vehicle is supported by Smartcar before launching the Connect flow. This allows you to provide a seamless user experience by verifying eligibility up front. ## What You Can Do * Check if a vehicle is compatible by VIN * Query supported makes and regions ## Authentication The Compatibility API uses a bearer token, which you can obtain from your Smartcar Dashboard or via the OAuth2 flow. ## Base URL ``` https://api.smartcar.com/compatibility/v2.0 ``` ## Key Resources * [Check Compatibility by VIN](/api-reference/compatibility/by-vin) * [Check Compatibility by Region and Make](/api-reference/compatibility/by-region-and-make) ## Example Use Cases * Pre-qualifying users before showing Smartcar Connect * Displaying supported makes and models in your app * Reducing user friction by avoiding unsupported vehicles For more details on using the Compatibility API, see [Compatibility API Reference](/api-reference/compatibility/by-vin). --- # Source: https://smartcar.com/docs/errors/api-errors/compatibility-errors.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Compatibility Errors > Thrown when Smartcar does not support a make, or feature for a vehicle. # `MAKE_NOT_COMPATIBLE` Smartcar is not yet compatible with this vehicle’s make in the country you specified. ```json theme={null} { "type": "COMPATIBILITY", "code": "MAKE_NOT_COMPATIBLE", "description": "Smartcar is not yet compatible with this vehicle’s make in the country you specified.", "docURL": "https://smartcar.com/docs/errors/api-errors/compatibility-errors#make-not-compatible", "statusCode": 501, "requestId": "5dea93a1-3f79-4246-90c5-89610a20471b", "resolution": { "type": null } } ``` **Suggested User Messaging**
`` is not yet able to connect to your car brand.
# `PLATFORM_NOT_CAPABLE` You're connected to the vehicle using an OEM integration that does not support this endpoint. This can be a result of the OEM migrating to a newer API or requiring vehicle owners to migrate to a new application they have released. ```json theme={null} { "type": "COMPATIBILITY", "code": "PLATFORM_NOT_CAPABLE", "description": "You're connected to the vehicle using an OEM integration that does not support this endpoint.", "docURL": "https://smartcar.com/docs/errors/api-errors/compatibility-errors#platform-not-capable", "statusCode": 501, "requestId": "5dea93a1-3f79-4246-90c5-89610a20471b", "resolution": { "type": "REAUTHENTICATE" } } ``` **Troubleshooting Steps**
For Tesla vehicles please have the owner re-authenticate using the latest Tesla authorization flow.
# `SMARTCAR_NOT_CAPABLE` Smartcar does not yet support this feature for this vehicle. ```json theme={null} { "type": "COMPATIBILITY", "code": "SMARTCAR_NOT_CAPABLE", "description": "Smartcar does not yet support this feature for this vehicle.", "docURL": "https://smartcar.com/docs/errors/api-errors/compatibility-errors#smartcar-not-capable", "statusCode": 501, "requestId": "5dea93a1-3f79-4246-90c5-89610a20471b", "resolution": { "type": null } } ``` **Troubleshooting Steps**
Please check that the vehicles make and engine type support the feature you are trying to use. Please contact us to learn when this feature will become available. If you have a vehicle that supports this feature and would like to help out, check out Smartcar’s Research Fleet.
# `VEHICLE_NOT_CAPABLE` This error occurs when a physical limitation makes the vehicle incapable of performing your request (e.g. battery electric vehicles are incapable of responding to read fuel requests). ```json theme={null} { "type": "COMPATIBILITY", "code": "VEHICLE_NOT_CAPABLE", "description": "The vehicle is incapable of performing your request.", "docURL": "https://smartcar.com/docs/errors/api-errors/compatibility-errors#vehicle-not-capable", "statusCode": 501, "requestId": "5dea93a1-3f79-4246-90c5-89610a20471b", "resolution": { "type": null } } ``` **Suggested User Messaging**
Your car is unable to perform this request.
--- # Source: https://smartcar.com/docs/errors/connect-errors/configuration-error.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Configuration > This error occurs when the user has encountered an Error page in Connect and has chosen to return to your application. | Parameter | Required | Description | | ------------------- | -------- | ----------------------------------------------------------------- | | `error` | `true` | `configuration_error` | | `error_description` | `true` | There has been an error in the configuration of your application. | | `status_code` | `true` | The status code of the error encountered in Connect | | `error_message` | `true` | The error message seen by the user | ```http Example redirect uri theme={null} HTTP/1.1 302 Found Location: https://example.com/callback ?error=configuration_error &error_description=There%20has%20been%20an%20error%20in%20the%20configuration%20of%20your%20application.&status_code=400 &error_message=You%20have%20entered%20a%20test%20mode%20VIN.%20Please%20enter%20a%20VIN%20that%20belongs%20to%20a%20real%20vehicle. ``` On redirect, Connect will return the status code and message of the error that they encountered. This will be triggered if: * A user tried to directly navigate to a page that is past their current step in Connect (i.e. going directly from the Preamble screen to the Permission Grants screen by directly going to connect.smartcar.com/grant). * A user is trying to use Single Select in live mode with a test mode VIN or with a simulated VIN in a non-simulated mode. * A user is trying to use Single Select with an invalid mock VIN. * A validation error occurs when trying to check compatibility by VIN. These cases will trigger the following error and give the user the ability to “Exit” Connect. --- # Source: https://smartcar.com/docs/getting-started/configure-application.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Configure Your Application > Learn how to configure your Smartcar application, including setting up permissions and redirect URIs. Once you have registered your application in the [Smartcar Dashboard](https://dashboard.smartcar.com), you can configure it to suit your business needs. ## Application Configuration Overview Your application configuration includes several key components: * **Application Name & Description**: A clear name and description help users understand what your application does. * **Redirect URI**: The URL to which users will be redirected after they authorize your application. This must match the redirect URI you use in your OAuth flow. * **Privacy Policy URL**: A link to your application's privacy policy that will be presented to users during the authorization process. * **Vehicle Data**: Select the specific vehicle data signals your application will request access to. This determines the permissions your application will need from users. Application Configuration in Smartcar Dashboard #### What’s Next? * [Connect your first vehicle](/getting-started/connect-vehicles). * [Build your first integration](/getting-started/integration-overview). --- # Source: https://smartcar.com/docs/getting-started/how-to/configure-permissions.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # How to Configure Permissions for Vehicle Data Collection > Step-by-step guide to selecting signals, commands, and attributes in the Smartcar Dashboard and requesting the right permissions from vehicle owners. To retrieve vehicle data through Smartcar, you must configure your application to request the correct permissions from vehicle owners. This guide walks you through the process using the Smartcar Dashboard. Go to the [Smartcar Dashboard](https://dashboard.smartcar.com/configuration) and select your application. Navigate to the Configuration section and choose the Vehicle access tab. Under the Signals, Commands, and Attributes tabs, select the specific vehicle data points and actions your application needs. Each selection corresponds to a permission that the vehicle owner must approve. Smartcar Dashboard configuration page showing signal selection and Connect Preview.
  • Signals: Dynamic vehicle data (e.g., battery level, odometer, location).
  • Commands: Actions your app can perform (e.g., lock/unlock, start charging).
  • Attributes: Static vehicle info (e.g., make, model, year).
Only select the permissions your application truly needs. This improves user trust and increases the likelihood of successful connections.
As you select signals, commands, and attributes, the Connect Preview on the right updates to show what the vehicle owner will see when connecting their vehicle. This preview lists the permissions your app is requesting and the vehicles that will be connected. Once you are satisfied with your selections, click Publish to save your configuration. Your application will now request these permissions from vehicle owners during the Smartcar Connect flow.
## Dynamic Permissions If your application needs to access different permissions based on user actions or vehicle types, you can leverage the `scope` parameter in the Smartcar Connect URL to dynamically request permissions at runtime. This allows you to tailor the permissions based on the specific vehicle or user context. Keep in mind that any permissions you pass via the `scope` parameter will override the permissions configured in the Smartcar Dashboard for that specific connection. ### Notes * If you need to change permissions later, you can return to this configuration page and update your selections. Vehicle owners will need to reauthorize your application to grant any new permissions. * The permissions you select here will determine the data and actions available to your application. Make sure to choose only what is necessary for your use case. *** ## What’s Next * [How to Connect Vehicles](/getting-started/connect-vehicles) * [How to Manage API Tokens](/getting-started/how-to/manage-api-tokens) * [API Reference: Permissions](/api-reference/permissions) --- # Source: https://smartcar.com/docs/getting-started/dashboard/connect-insights.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Connect Insights > Connect Insights allows you to visualize your Connect conversion rate and identify where individual users are running into issues during onboarding. ## Conversion Rate For Enterprise customers, the **Conversion Rate** gives you high-level insight into how users are progressing through the Connect Flow over the last two weeks. ## Session Details Clicking into an event in the **Sessions Feed** will pull up more detailed information for that specific user's session, allowing you to see where they dropped off and highlighting issues they may have run into. If you need to dial into a specific time frame or individual user, you can use filters such as Date, VIN, User or Session ID to do so. --- # Source: https://smartcar.com/docs/connect/connect-sdks.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # SDKs for Connect > Our SDKs make integrating Smartcar fast and easy in different languages and frameworks. For mobile or single page web apps, you can use one of our frontend SDKs. Please note that our frontend SDKs only handle integrating Connect into your application. You will still need to use a [backend SDK](/api-reference/api-sdks) to manage tokens and make API requests to vehicles. **Note:** In addition to using a frontend SDK to integrate with Smartcar Connect, a backend SDK is strongly recommended to securely manage tokens, receive data from Smartcar, and make API requests to issue commands to vehicles. The backend SDK facilitates authentication, token exchange, and all communication with Smartcar’s APIs. For server-side rendered applications, you can use one of our backend SDKs:
Don't see an SDK for your language? No problem! As long as you can build a URL and handle HTTP requests, you're good to go. --- # Source: https://smartcar.com/docs/getting-started/connect-vehicles.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Connect Vehicles > Learn how to connect vehicles to your Smartcar application using Smartcar Connect. Smartcar Connect is the starting point for connecting vehicles to your application. It uses Smartcar's patented and secure [OAuth 2.0](https://oauth.net/2/) flow to let vehicle owners grant your app access to their car data and control features. ### Prerequisites Before you begin, make sure you have [configured](/getting-started/configure-application) your Smartcar application in the [Smartcar Dashboard](https://dashboard.smartcar.com/configuration). You will need: * Your application's `Client ID` and `Client Secret` * A valid `redirect_uri` for your application * The vehicle data you want to access (e.g., odometer, location, etc.) Direct your users to the Smartcar Connect URL. This can be done using the Smartcar SDK for your platform (web, iOS, or Android) or copying the URL from the [Smartcar Dashboard](https://dashboard.smartcar.com/configuration). The user will: * Select their vehicle brand * Log in with their connected services account * Review and approve the requested permissions After the user authorizes access, Smartcar will redirect them back to your application using the default `redirect_uri` you provided in your app configuration. The redirect will include an authorization `code` as a query parameter. Your backend exchanges the authorization code for an access token and refresh token by making a request to [Smartcar’s token endpoint](/api-reference/authorization/auth-code-exchange). You’ll need your app’s `client_id`, `client_secret`, and the same `redirect_uri`. ``` POST https://auth.smartcar.com/oauth/token Content-Type: application/x-www-form-urlencoded client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&grant_type=authorization_code&code=AUTH_CODE&redirect_uri=YOUR_REDIRECT_URI ``` The response will include an `access_token` and a `refresh_token`. Store the `access_token` and `refresh_token` securely in your application's database. These tokens are sensitive credentials that allow access to vehicle data and actions, so: * Use encrypted storage or a secrets manager whenever possible. * Never log tokens or expose them in client-side code. * Associate tokens with the correct user and vehicle in your database for easy lookup and management. Here is a [recommended architecture structure](/getting-started/how-to/architecture-design). * The `access_token` expires after two hours. You will need to use the `refresh_token` to obtain new access tokens when needed. The `refresh_token` expires after 60 days. If the `refresh_token` expires, the user will need to reauthorize your application. Vehicle owners may occasionally need to re-authenticate due to OEM platform migrations, credential changes, or permission updates. Build your integration to handle these scenarios gracefully. See [Handle Re-authentication](/connect/re-auth/oem-migrations) for implementation guidance. ## What’s Next * [Build your first integration](/getting-started/integration-overview). * [See more about Smartcar Connect](/connect/what-is-connect) * [Explore available API endpoints](/api-reference) * [Learn about permissions and scopes](/api-reference/permissions) --- # Source: https://smartcar.com/docs/errors/api-errors/connected-services-account-errors.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Connected Services Account Errors > Thrown when there are issues with the user's connected service account. # `ACCOUNT_ISSUE` Action needed in the user’s connected services account. The user needs to log in and complete an outstanding task in their connected services account. Examples: * The user needs to accept the connected services app’s Terms of Service. * The user has created but not yet fully activated their connected services account. * If you've received this error while testing with Vehicle Simulator, it likely means a simulation has not been started for the vehicle. Visit the Simulator tab in the Smartcar Dashboard to start a simulation for the vehicle. ```json theme={null} { "type": "CONNECTED_SERVICES_ACCOUNT", "code": "ACCOUNT_ISSUE", "description": "Action needed in the user’s connected services account. Please prompt the user to log into their connected services account and complete any outstanding tasks.", "docURL": "https://smartcar.com/docs/errors/api-errors/connected-services-account-errors#account-issue", "statusCode": 400, "requestId": "5dea93a1-3f79-4246-90c5-89610a20471b", "resolution": { "type": null }, "suggestedUserMessage": "Action required in your connected services account. Please log into your connected services app or web portal and complete any outstanding tasks (e.g. finish activating your account or accept the Terms of Service)." } ``` ### Suggested resolution The user can resolve this error by logging into their connected services account and completing any outstanding tasks. ### Troubleshooting steps * Prompt the user to log into their connected services account using the app or web portal. * Prompt the user to try triggering an action on their car, e.g. locking the doors or flashing the lights. * At this point, the app should prompt the user to complete their outstanding task. ### Suggested user message > Action required in your connected services account. Please log into your connected services app or web portal and complete any outstanding tasks (e.g. finish activating your account or accept the Terms of Service). *** # `AUTHENTICATION_FAILED` Smartcar was unable to authenticate with the user’s connected services account. This error usually occurs when the user has updated their connected services account credentials and not yet re-authenticated in Smartcar Connect. The user should re-authenticate using Smartcar Connect. ```json theme={null} { "type": "CONNECTED_SERVICES_ACCOUNT", "code": "AUTHENTICATION_FAILED", "description": "Smartcar was unable to authenticate with the user’s connected services account. Please prompt the user to re-authenticate using Smartcar Connect.", "docURL": "https://smartcar.com/docs/errors/api-errors/connected-services-account-errors#authentication-failed", "statusCode": 400, "requestId": "5dea93a1-3f79-4246-90c5-89610a20471b", "resolution": { "type": "REAUTHENTICATE", "url": "https://connect.smartcar.com/oauth/reauthenticate?response_type=vehicle_id&client_id=8229df9f-91a0-4ff0-a1ae-a1f38ee24d07&vehicle_id=sc4a1b01e5-0497-417c-a30e-6df6ba33ba46" }, "suggestedUserMessage": "Your car got disconnected from . Please use this link to re-connect your car: ." } ``` ### Suggested resolution Please provide the user with a link to Smartcar Connect Re-authentication and prompt them to re-connect their vehicle. The resolution field contains a partially constructed URL for Smartcar Connect Re-authentication, please see the API reference for more detail. ### Suggested user message > Your car got disconnected from \. Please use this link to re-connect your car: \. *** # `NO_VEHICLES` No vehicles found in the user’s connected services account. The user might not yet have added their vehicle to their account, or they might not yet have activated connected services for the vehicle. ```json theme={null} { "type": "CONNECTED_SERVICES_ACCOUNT", "code": "NO_VEHICLES", "description": "No vehicles found in the user’s connected services account. Please prompt the user to add their vehicle to their connected services account and re-authenticate using Smartcar Connect.", "docURL": "https://smartcar.com/docs/errors/api-errors/connected-services-account-errors#no-vehicles", "statusCode": 400, "requestId": "5dea93a1-3f79-4246-90c5-89610a20471b", "resolution": { "type": null }, "suggestedUserMessage": "Your car got disconnected from . Please use this link to re-connect your car: ." } ``` ### Suggested resolution Please provide the user with a link to Smartcar Connect Re-authentication and prompt them to re-connect their vehicle. The resolution field contains a partially constructed URL for Smartcar Connect Re-authentication, please see the API reference for more detail. ### Troubleshooting Steps * Prompt the user to log into their connected services account using the app or web portal. * Prompt the user to check whether there are any vehicles listed in their account. * If there are no vehicles listed, prompt the user to add their vehicle. * If there are one or more vehicles listed, this means that none of the vehicles have had their connected services activated. Prompt the user to activate connected services for at least one vehicle. * Provide the user with a link to Smartcar Connect and prompt them to re-connect their vehicle. ### Suggested user message > Your car got disconnected from \. Please use this link to re-connect your car: \. *** # `PERMISSION` This error occurs when a vehicle owner had initially granted Smartcar access to their OEM account, but has since revoked it via the OEM's management portal. ```json theme={null} { "type": "CONNECTED_SERVICES_ACCOUNT", "code": "PERMISSION", "description": "The vehicle owner has revoked Smartcar’s access to their OEM account.", "docURL": "https://smartcar.com/docs/errors/api-errors/connected-services-account-errors#permission", "statusCode": 400, "requestId": "5dea93a1-3f79-4246-90c5-89610a20471b", "resolution": { "type" : "REAUTHENTICATE" } } ``` ### Suggested resolution For Tesla Owners: * Prompt the vehicle owner to go through the Connect flow again or use our [reauthentication flow](/help/oem-integrations/tesla/developers#stand-alone-flow) to streamline the process. *** # `SUBSCRIPTION` The vehicle’s connected services subscription is inactive or does not support the requested API endpoint. ```json theme={null} { "type": "CONNECTED_SERVICES_ACCOUNT", "code": "SUBSCRIPTION", "description": "The vehicle’s connected services subscription is inactive or does not support the requested API endpoint.", "docURL": "https://smartcar.com/docs/errors/api-errors/connected-services-account-errors#subscription", "statusCode": 400, "requestId": "5dea93a1-3f79-4246-90c5-89610a20471b", "resolution": { "type": null }, "suggestedUserMessage": "Your car’s connected services subscription has either expired or it doesn’t support the necessary features to connect to . Please activate your subscription or contact us to upgrade your subscription." } ``` ### Suggested resolution The user can resolve this error by logging into their connected services account and either (re-)activating their subscription or purchasing the required subscription package. ### Troubleshooting Steps If you don’t know which subscription package the user needs to purchase, please contact our team for help. ### Suggested user message > Your car’s connected services subscription has either expired or it doesn’t support the necessary features to connect to \. Please activate your subscription or contact us to upgrade your subscription. *** # `VEHICLE_MISSING` This vehicle is no longer associated with the user’s connected services account. The user might have removed it from their account. The user needs to log into their connected services account and either re-add the vehicle or re-activate its subscription. If you've received this error while testing with Vehicle Simulator, it likely means the simulated vehicle has not been found in your application. Visit the Simulator tab in the Smartcar Dashboard to create a simulated vehicle to test with. ```json theme={null} { "type": "CONNECTED_SERVICES_ACCOUNT", "code": "VEHICLE_MISSING", "description": "This vehicle is no longer associated with the user’s connected services account. Please prompt the user to re-add the vehicle to their account.", "docURL": "https://smartcar.com/docs/errors/api-errors/connected-services-account-errors#vehicle-missing", "statusCode": 400, "requestId": "5dea93a1-3f79-4246-90c5-89610a20471b", "resolution": { "type": null }, "suggestedUserMessage": "Your car’s connected services subscription has either expired or it doesn’t support the necessary features to connect to . Please activate your subscription or contact us to upgrade your subscription." } ``` ### Suggested resolution The user can resolve this issue by logging into their connected services account and either re-adding the vehicle or re-activating its subscription. If the user wishes to disconnect their vehicle from your app, please make a request to our Disconnect endpoint and refrain from making API requests to this vehicle in the future. ### Troubleshooting Steps * Prompt the user to log into their connected services account using the app or web portal. * Prompt the user to check whether the vehicle is listed under their account. * If the vehicle is not listed, prompt the user to add the vehicle to their account. * If the vehicle is listed, prompt the user to activate the vehicle’s connected services subscription. ### Suggested user message > This car is no longer associated with your connected services account. Please log into your account and re-add this car. *** # `VIRTUAL_KEY_REQUIRED` The vehicle owner has granted your application access to the vehicle through Smartcar. However, additional steps are needed on the owners part in order to perform this specific request. ```json theme={null} { "type": "CONNECTED_SERVICES_ACCOUNT", "code": "VIRTUAL_KEY_REQUIRED", "description": "The vehicle owner needs to grant additional access to Smartcar in order to perform this request.", "docURL": "https://smartcar.com/docs/errors/api-errors/connected-services-account-errors#virtual-key-required", "statusCode": 400, "requestId": "5dea93a1-3f79-4246-90c5-89610a20471b", "resolution": { "type" : "ACTION_REQUIRED", "url" : "https://www.tesla.com/_ak/smartcar.com" } "suggestedUserMessage": "In order to perform this request you’ll need to add a Third-Party Virtual key to your vehicle. Please open this link on the phone with your Tesla App to complete this step." } ``` ### Suggested resolution For Tesla Owners: * The vehicle owner needs to add Smartcar’s Third-Party Virtual Key. As of late 2023, Tesla is starting to require virtual keys for Third-Party applications to perform commands. * In order to issue commands, please prompt the vehicle owner to add Smartcar’s Third-Party virtual key: [https://www.tesla.com/\_ak/smartcar.com](https://www.tesla.com/_ak/smartcar.com) ### Troubleshooting steps * Please direct the vehicle owner to add Smartcar’s [Third-Party Virtual Key (tesla.com)](https://www.tesla.com/_ak/smartcar.com) in order to allow your application to issue commands to the vehicle. ### Suggested user message > In order to perform this request you’ll need to add a Third-Party Virtual key to your vehicle. Please open [this](https://www.tesla.com/_ak/smartcar.com) link on the phone with your Tesla App to complete this step. --- # Source: https://smartcar.com/docs/api-reference/signals/connectivitysoftware.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # ConnectivitySoftware Signals ### Current Firmware Version Signal code: `connectivitysoftware-currentfirmwareversion` Current version number of the firmware installed on the vehicle's telematics control unit or connected hardware. ```json Example theme={null} { "value": "2024.4.5" } ``` --- # Source: https://smartcar.com/docs/api-reference/signals/connectivitystatus.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # ConnectivityStatus Signals ### Is Asleep Signal code: `connectivitystatus-isasleep` Boolean indicator that shows whether the vehicle is in a low-power or sleep state. ```json Example theme={null} { "value": false } ``` ### Is Digital Key Paired Signal code: `connectivitystatus-isdigitalkeypaired` Boolean indicator that shows whether a digital key has been successfully paired with the vehicle. ```json Example theme={null} { "value": true } ``` ### Is Online Signal code: `connectivitystatus-isonline` Boolean indicator that shows the connectivity status of the vehicle. ```json Example theme={null} { "value": true } ``` --- # Source: https://smartcar.com/docs/api-reference/tesla/control-charge-port.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Charge Port > Open or close the vehicle's charge port door. ## Permission `control_charge` ## Request **Path** **Body** Indicate whether to open or close the charge port door. Options: `OPEN` or `CLOSE` ```bash cURL theme={null} curl "https://api.smartcar.com/v2.0/vehicles/{id}/{make}/charge/charge_port_door" \ -H "Authorization: Bearer {token}" \ -X "POST" \ -H "Content-Type: application/json" \ -d '{"action" : "OPEN"}' ``` ```python Python theme={null} charge_port = vehicle.request( "POST", "{make}/charge/charge_port_door", {"action" : "OPEN"} ) ``` ```js Node theme={null} const chargePort = vehicle.request( "POST", "{make}/charge/charge_port_door", {"action" : "OPEN"} ); ``` ```java Java theme={null} SmartcarVehicleRequest request = new SmartcarVehicleRequest.Builder() .method("POST") .path("{make}/charge/charge_port_door") .addBodyParameter("action" : "OPEN") .build(); VehicleResponse chargePort = vehicle.request(request); ``` ```ruby Ruby theme={null} charge_port = vehicle.request( "POST", "{make}/charge/charge_port_door", {"action" : "OPEN"} ) ``` ## Response If the request is successful, Smartcar will return “success”. If the request is successful, Smartcar will return a message. ```json Example Response theme={null} { "message": "Successfully sent request to vehicle", "status": "success" } ``` --- # Source: https://smartcar.com/docs/api-reference/evs/control-charge.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Start & Stop Charge > Start or stop the vehicle charging. 2.0 is still the only supported version for sending remote commands. If you need to send commands, please continue using v2.0 until commands are supported in the latest version later this year. ## Permission `control_charge` ## Request **Path** **Body** `START` or `STOP` the vehicle charging. ## Response If the request is successful, Smartcar will return “success”. If the request is successful, Smartcar will return a message. ```json Example Response theme={null} { "message": "Successfully sent request to vehicle", "status": "success" } ``` ## Notes **BMW and MINI**
Vehicle needs to be on OS Version 8+ **Ford and Lincoln**
Issuing a start command while the vehicle has a schedule in place for its current charging location will result in the vehicle charging to 100%. Please see [charge schedule by location](/api-reference/ford/set-charge-schedule-by-location) for details on setting a charge limit with preferred charging times or clearing schedules. **Nissan**
Currently only START charge commands are supported in the US. See [Set Charge Schedule](/api-reference/nissan/set-charge-schedule) for details on setting a charge schedule for Nissan vehicles. **Chevrolet, GMC, Buick and Cadillac**
These vehicles require a minimum charge of 50% in order to be able to start or stop charging via the API. --- # Source: https://smartcar.com/docs/api-reference/tesla/control-frunk.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Frunk > Open or close the frunk (front trunk) of the Tesla vehicle. ## Permission `control_trunk` ## Request **Path** **Body** Indicate whether to open or close the charge port door. Options: `OPEN` or `CLOSE` ```bash cURL theme={null} curl "https://api.smartcar.com/v2.0/vehicles/{id}/{make}/security/frunk" \ -H "Authorization: Bearer {token}" \ -X "POST" \ -H "Content-Type: application/json" \ -d '{"action" : "OPEN"}' ``` ```python Python theme={null} frunk = vehicle.request( "POST", "{make}/security/frunk", {"action" : "OPEN"} ) ``` ```js Node theme={null} const frunk = vehicle.request( "POST", "{make}/security/frunk", {"action" : "OPEN"} ); ``` ```java Java theme={null} SmartcarVehicleRequest request = new SmartcarVehicleRequest.Builder() .method("POST") .path("{make}/security/frunk") .addBodyParameter("action" : "OPEN") .build(); VehicleResponse frunk = vehicle.request(request); ``` ```ruby Ruby theme={null} frunk = vehicle.request( "POST", "{make}/security/frunk", {"action" : "OPEN"} ) ``` ## Response If the request is successful, Smartcar will return “success”. If the request is successful, Smartcar will return a message. ```json Example Response theme={null} { "message": "Successfully sent request to vehicle", "status": "success" } ``` --- # Source: https://smartcar.com/docs/api-reference/control-lock-unlock.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Lock & Unlock > Lock or unlock the vehicle. 2.0 is still the only supported version for sending remote commands. If you need to send commands, please continue using v2.0 until commands are supported in the latest version later this year. ## Permission `control_security` ## Request **Path** **Body** `LOCK` or `UNLOCK` the vehicle’s doors. ## Response If the request is successful, Smartcar will return “success” (HTTP 200 status). If the request is successful, Smartcar will return a message (HTTP 200 status). ```json Example Response theme={null} { "message": "Successfully sent request to vehicle", "status": "success" } ``` --- # Source: https://smartcar.com/docs/api-reference/tesla/control-trunk.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Trunk > Open or close the trunk of the Tesla vehicle. ## Permission `control_trunk` ## Request **Path** **Body** Indicate whether to open or close the charge port door. Options: `OPEN` or `CLOSE` ```bash cURL theme={null} curl "https://api.smartcar.com/v2.0/vehicles/{id}/{make}/security/trunk" \ -H "Authorization: Bearer {token}" \ -X "POST" \ -H "Content-Type: application/json" \ -d '{"action" : "OPEN"}' ``` ```python Python theme={null} trunk = vehicle.request( "POST", "{make}/security/trunk", {"action" : "OPEN"} ) ``` ```js Node theme={null} const trunk = vehicle.request( "POST", "{make}/security/trunk", {"action" : "OPEN"} ); ``` ```java Java theme={null} SmartcarVehicleRequest request = new SmartcarVehicleRequest.Builder() .method("POST") .path("{make}/security/trunk") .addBodyParameter("action" : "OPEN") .build(); VehicleResponse trunk = vehicle.request(request); ``` ```ruby Ruby theme={null} trunk = vehicle.request( "POST", "{make}/security/trunk", {"action" : "OPEN"} ) ``` ## Response If the request is successful, Smartcar will return “success”. If the request is successful, Smartcar will return a message. ```json Example Response theme={null} { "message": "Successfully sent request to vehicle", "status": "success" } ``` --- # Source: https://smartcar.com/docs/connect/advanced-config/country-flag.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Country Selection > By default Connect will launch based on the devices location impacting the brands that are available to the user e.g. Renault is only available in Europe. You can override this behavior by passing a country feature flag in your Connect URL in the form `country:{country_code}`. Your feature flag should contain the [two-character ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the country that your user is located in. Our SDKs provide ways for you to add this as part of the various `authUrlBuilder` or `getAuthUrl` methods. ```plaintext Connect URL w/ country feature flag theme={null} https://connect.smartcar.com/oauth/authorize? response_type=code &client_id=8229df9f-91a0-4ff0-a1ae-a1f38ee24d07 &scope=read_odometer read_vehicle_info &redirect_uri=https://example.com/home &flags=country:GB ``` Alternatively, your users can manually change their country and language on Connect's preamble screen: --- # Source: https://smartcar.com/docs/integrations/webhooks/creating-webhooks.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Creating Webhooks > Step-by-step guide to creating and configuring webhook integrations in the Smartcar Dashboard Head over to the [Smartcar Dashboard](https://dashboard.smartcar.com/integrations) to set up your webhook integration. There are four main steps to create a webhook in Smartcar: Application Configuration in Smartcar Dashboard From the integrations page, start by creating a new integration and choosing webhook. For most use cases, webhooks are the recommended option. Define **when** Smartcar should send you a webhook. This is the vehicle event or condition that causes data to be delivered. **Example triggers:** * Vehicle's battery percentage changes * Vehicle is plugged in or unplugged * Odometer changes * Doors or windows open * Vehicle location changes After choosing a trigger, specify **what** vehicle data ("signals") should be included in the webhook payload. Browse the complete [Vehicle Signals catalog](/api-reference/signals/schema) to see all available data points. **All selected signals are delivered in every webhook event**, not just the signals that triggered it. This ensures you always receive complete vehicle state data. Your selection directly maps to the permissions that the vehicle owner granted your application during the connection process. Smartcar offers over 20 specific [permissions](https://smartcar.com/docs/api-reference/permissions) for granular control. Enter the destination URL where Smartcar should send the data. This should be your application's endpoint to receive webhook payloads. Your callback URI must handle the `"eventType": "VERIFY"` received in the request payload and respond with a `200` status code and a `{"challenge": "{HMAC}"}` body. **Optional: Separate Error Callback URI** You can optionally configure a separate callback URI specifically for `VEHICLE_ERROR` events. If not specified, all events (`VEHICLE_STATE` and `VEHICLE_ERROR`) will be sent to the same callback URI. **Resources:** * [Callback Verification Guide](/integrations/webhooks/callback-verification) - Learn how to verify your endpoint * [Webhook Receiver Recipe](/getting-started/tutorials/webhook-receiver-recipe) - Deploy a pre-built, verified receiver * [Receiving Webhooks](/integrations/webhooks/receiving-webhooks) - Build your own receiver from scratch *** ## Next Steps After creating your webhook, you'll need to subscribe vehicles to start receiving data. Learn how to subscribe vehicles using auto-enrollment, the Dashboard, or the API Learn how to handle incoming webhook deliveries Complete reference of webhook events and payloads Secure your webhook endpoint with verification Understand retry policies and delivery guarantees --- # Source: https://smartcar.com/docs/connect/dashboard-config.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Dashboard Configuration ## Registration To get started, register your application with Smartcar by navigating to our [dashboard](https://dashboard.smartcar.com/login). After registration, your application will be assigned a `CLIENT_ID` and a `CLIENT_SECRET`. The `CLIENT_SECRET` must be kept safe and used only in exchanges between your application’s server and Smartcar’s authorization server. ## Redirect URIs To authorize with Smartcar, you’ll need to provide one or more redirect URIs. The user will be redirected to the specified URI upon authorization. On redirect, the URI will contain an authorization `code` query parameter that must be exchanged with Smartcar’s authorization server for an `ACCESS_TOKEN`. The first redirect URI you add to your application is automatically set as the default. If you do not specify a `redirect_uri` in your Connect URL, Smartcar will use this default URI. You can add multiple URIs and set any of them as the default in the Smartcar Dashboard. The redirect URIs must match one of the following formats: | Protocol | Format | Example | | -------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | | HTTP | a localhost URI with protocol `http://` | `http://localhost:8000` | | HTTPS | a URI with protocol `https://` | `https://myapplication.com` | | JavaScript SDK | `https://javascript-sdk.smartcar.com/v2/redirect?app_origin={localhost-or-HTTPS-origin}` | `https://javascript-sdk.smartcar.com/v2/redirect?app_origin=https://myapp.com` | | Custom-scheme | `sc{clientId}://{hostname-with-optional-path-component-or-TLD}` | `sc4a1b01e5-0497-417c-a30e-6df6ba33ba46://callback` | HTTP is allowed only for testing purposes on localhost ### Javascript SDK The JavaScript SDK redirect is used along with the JavaScript SDK library. For more details and examples on the redirect usage, see the [SDK documentation](https://github.com/smartcar/javascript-sdk). ### Custom-scheme Custom-scheme URIs are used for mobile applications. They must begin with `sc{clientId}` and can have an optional path or TLD. See the OAuth reference on redirect URIs. --- # Source: https://smartcar.com/docs/getting-started/dashboard/dashboard-mfa.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Dashboard Multi-Factor Authentication (MFA) ## Configuring Multi-Factor Authentication From the settings gear, you can access User Security, which supports Multi-Factor Authentication (MFA). Enable MFA and scan with your preferred authenticator app such as Google Authenticator or 1Password. Once enabled, each following login will require the use of your authenticator app to provide a unique code for login. MFA can be disabled for your user at any time, though the authenticator app will be required to disable MFA. --- # Source: https://smartcar.com/docs/api-reference/management/delete-vehicle-connections.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Vehicle Connections > Deletes all vehicle connections associated with a Smartcar user ID or a specific vehicle. ## Request **Header** In the format `Basic base64(default:{application_management_token})`. You can find your `application_management_token` under your Application Configuration in the Smartcar Dashboard. **Query** You can delete connections in three ways: * Provide a `vehicle_id` to remove all connections for that vehicle across all users. * Provide a `user_id` to remove all vehicles linked to that user. * Provide both a `vehicle_id` and `user_id` to remove only that vehicle for that specific user. ```bash cURL theme={null} curl -X DELETE "https://management.smartcar.com/v2.0/management/connections/?user_id=UUID12345&vehicle_id=UUID67890" \ -H "Authorization: Basic $(echo -n "default:$SMARTCAR_APP_MANAGEMENT_TOKEN" | base64)" ``` ```python Python theme={null} import os import base64 import requests user_id = "UUID12345" vehicle_id = "UUID67890" token = os.getenv("SMARTCAR_APP_MANAGEMENT_TOKEN") auth_header = base64.b64encode(f"default:{token}".encode()).decode() headers = { "Authorization": f"Basic {auth_header}", "Content-Type": "application/json", } url = ( "https://management.smartcar.com/v2.0/management/connections/" f"?user_id={user_id}&vehicle_id={vehicle_id}" ) response = requests.delete(url, headers=headers) ``` ```javascript Node theme={null} const basicAuth = Buffer.from(`default:${process.env.SMARTCAR_APP_MANAGEMENT_TOKEN}`).toString('base64'); const disconnectResponse = await fetch( `https://management.smartcar.com/v2.0/management/connections/?user_id=${smartcar_user_id}&vehicle_id=${smartcar_vehicle_id}`, { method: 'DELETE', headers: { 'Authorization': `Basic ${basicAuth}`, 'Content-Type': 'application/json', }, } ); ``` ```java Java theme={null} import java.net.HttpURLConnection; import java.net.URL; import java.util.Base64; String userId = "UUID12345"; String vehicleId = "UUID67890"; String token = System.getenv("SMARTCAR_APP_MANAGEMENT_TOKEN"); String auth = Base64.getEncoder().encodeToString(("default:" + token).getBytes()); URL url = new URL("https://management.smartcar.com/v2.0/management/connections/?user_id=" + userId + "&vehicle_id=" + vehicleId); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("DELETE"); conn.setRequestProperty("Authorization", "Basic " + auth); conn.setRequestProperty("Content-Type", "application/json"); int responseCode = conn.getResponseCode(); ``` ```ruby Ruby theme={null} require 'net/http' require 'uri' require 'base64' user_id = "UUID12345" vehicle_id = "UUID67890" token = ENV['SMARTCAR_APP_MANAGEMENT_TOKEN'] auth = Base64.strict_encode64("default:#{token}") uri = URI("https://management.smartcar.com/v2.0/management/connections/?user_id=#{user_id}&vehicle_id=#{vehicle_id}") request = Net::HTTP::Delete.new(uri) request['Authorization'] = "Basic #{auth}" request['Content-Type'] = 'application/json' response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http| http.request(request) end puts response.body ``` ```json Response theme={null} { "connections": [ { "userId": "", "vehicleId": "" } ] } ``` ## Response An array of connections ID of the user that authorized the deleted connection (UUID v4) ID of the vehicle disconnected (UUID v4) --- # Source: https://smartcar.com/docs/api-reference/webhooks/delivery-behavior.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Delivery Behavior > HTTP delivery mechanics, retry policies, timeouts, and ordering guarantees Understanding how Smartcar delivers webhook events helps you build a reliable integration. This page covers the technical details of webhook delivery, including HTTP semantics, retry behavior, and timing expectations. ## HTTP Request Format ### Request Method All webhook deliveries use `HTTP POST` requests sent to your configured callback URI. ### Request Headers Smartcar includes the following headers with every webhook delivery: Always set to `application/json`. All webhook payloads are JSON-encoded. HMAC-SHA256 signature for payload verification. See [Payload Verification](/integrations/webhooks/payload-verification) for details on how to validate this signature. Identifies requests as coming from Smartcar. Format: `Smartcar/{version}`. ### Request Body The request body contains a JSON payload matching one of the event types documented in [Event Reference](/api-reference/webhooks/events/overview). All requests include: * Valid JSON formatting * UTF-8 encoding * Content-Length header matching the payload size ## Expected Response ### Success Response Your webhook endpoint must return a **2xx status code** (200, 201, 202, 204, etc.) within the timeout window to acknowledge successful receipt. Any 2xx response is treated as success. ```http HTTP Response theme={null} HTTP/1.1 200 OK Content-Type: application/json {} ``` ```python Python theme={null} @app.post("/webhooks/smartcar") def handle_webhook(request): # Persist payload first save_to_queue(request.body) # Return 200 immediately return {"status": "received"}, 200 ``` ```javascript Node.js theme={null} app.post('/webhooks/smartcar', (req, res) => { // Persist payload first saveToQueue(req.body); // Return 200 immediately res.status(200).json({ status: 'received' }); }); ``` ```java Java theme={null} @PostMapping("/webhooks/smartcar") public ResponseEntity> handleWebhook(@RequestBody String payload) { // Persist payload first saveToQueue(payload); // Return 200 immediately return ResponseEntity.ok(Map.of("status", "received")); } ``` **Any 2xx status code is accepted.** You can return 200, 201, 202, 204, or any other 2xx response. Smartcar treats all 2xx codes as successful delivery. **Response body is ignored.** Smartcar only checks the HTTP status code. You can return an empty body or a simple acknowledgment object. ### Response Timeout **Your endpoint must respond within 15 seconds.** Requests that exceed this timeout are treated as delivery failures, even if your server eventually responds with a 200 status. **Decouple receiving from processing.** Persist the webhook payload to a queue or database immediately, return `200 OK`, then process the data asynchronously. This prevents timeouts from long-running business logic. ### Failed Responses Any of the following are considered delivery failures and will trigger retries: * Non-2xx HTTP status codes (including 3xx redirects, 4xx client errors, 5xx server errors) * Connection timeouts (> 15 seconds) * Connection refused or DNS resolution failures * TLS/SSL handshake failures * Network errors or connection resets ## Retry Behavior ### Retry Policy When a delivery fails, Smartcar automatically retries up to **3 times** using an **exponential backoff** strategy with an initial delay of 25 seconds: | Attempt | Wait Time | Total Elapsed | | ------------- | ----------- | -------------------- | | 1st (initial) | 0s | 0s | | 2nd | 25 seconds | 25 seconds | | 3rd | 50 seconds | 1 minute 15 seconds | | 4th (final) | 100 seconds | 2 minutes 55 seconds | If all 4 delivery attempts fail, the payload is permanently dropped. Future events will still be attempted as long as the webhook remains active. ### What Triggers Retries Retries occur for: * Non-2xx HTTP status codes (3xx, 4xx, 5xx) * Request timeouts (> 15 seconds) * Network errors (connection refused, DNS failures, etc.) * TLS/SSL errors ### What Doesn't Trigger Retries Once your endpoint returns any 2xx status code, Smartcar considers the delivery successful and will not retry, even if: * Your processing logic fails later * You detect the payload is invalid * Your database write fails after responding **Always validate before responding.** If you return a 2xx status code and then discover the payload is invalid, you cannot trigger a retry. The delivery is considered complete. ### Retry Identification Each delivery attempt receives a unique `deliveryId`, but the `eventId` remains the same across all retry attempts. Use the `eventId` to identify retries of the same event: ```json theme={null} { "eventId": "f7c0f3e6-4c9d-4f0e-8e5d-6e7f8a9b0c1d", // Same across all retries // ... event data ... "meta": { "deliveryId": "5d569643-3a47-4cd1-a3ec-db5fc1f6f03b", // Different for each attempt "deliveredAt": 1678901234567 } } ``` If the first delivery fails and Smartcar retries, the payload will have: * **Same `eventId`**: `f7c0f3e6-4c9d-4f0e-8e5d-6e7f8a9b0c1d` * **New `deliveryId`**: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` * **Updated `deliveredAt`**: timestamp of the retry attempt Use `eventId` for deduplication, not `deliveryId`. The `eventId` uniquely identifies the webhook event, while `deliveryId` only identifies the specific delivery attempt. See [Idempotency & Deduplication](/integrations/webhooks/best-practices#implement-idempotency) for best practices on handling retries. ## Concurrent Deliveries ### Multiple Events for the Same Vehicle Smartcar can deliver **multiple events for the same vehicle simultaneously**. This most commonly occurs when a vehicle is in a partial error state and triggers both: * A `VEHICLE_STATE` event with signal data * A `VEHICLE_ERROR` event with error details Your webhook endpoint must handle concurrent requests for the same vehicle. Design your processing logic to be thread-safe and avoid race conditions. ```python Python - Thread-Safe Processing theme={null} from threading import Lock vehicle_locks = {} @app.post("/webhooks/smartcar") def handle_webhook(request): payload = request.json vehicle_id = payload['data']['vehicle']['id'] # Get or create a lock for this vehicle if vehicle_id not in vehicle_locks: vehicle_locks[vehicle_id] = Lock() # Process with vehicle-specific lock with vehicle_locks[vehicle_id]: process_payload(payload) return {"status": "received"}, 200 ``` ```javascript Node.js - Async Queue theme={null} const async = require('async'); const vehicleQueues = {}; app.post('/webhooks/smartcar', (req, res) => { const vehicleId = req.body.data.vehicle.id; // Create queue for this vehicle if it doesn't exist if (!vehicleQueues[vehicleId]) { vehicleQueues[vehicleId] = async.queue(processPayload, 1); } // Add to vehicle-specific queue vehicleQueues[vehicleId].push(req.body); // Return 200 immediately res.status(200).json({ status: 'received' }); }); ``` ### Cross-Vehicle Concurrency Events for **different vehicles** can and will be delivered concurrently. If you have 1,000 vehicles subscribed to a webhook, you may receive events for multiple vehicles at the same time. Your infrastructure should be able to handle concurrent requests proportional to your fleet size. ## Event Batching ### Single vs Multiple Deliveries **One event per delivery.** Each webhook request contains a single event (either `VEHICLE_STATE` or `VEHICLE_ERROR`). However, the number of deliveries depends on how the vehicle reports changes: If a vehicle reports 3 signal changes at the same time (e.g., during a single vehicle data poll), Smartcar delivers **one `VEHICLE_STATE` event** containing all changed signals: ```json theme={null} { "eventType": "VEHICLE_STATE", "data": { "triggers": ["Charge.IsCharging", "TractionBattery.StateOfCharge", "TractionBattery.Range"], "signals": { "Charge.IsCharging": { "value": true, ... }, "TractionBattery.StateOfCharge": { "value": 85, ... }, "TractionBattery.Range": { "value": 250, ... } } } } ``` If a vehicle reports the same 3 signals as separate changes in quick succession, Smartcar delivers **three separate `VEHICLE_STATE` events**: **Delivery 1:** ```json theme={null} { "eventType": "VEHICLE_STATE", "data": { "triggers": ["Charge.IsCharging"], "signals": { "Charge.IsCharging": { "value": true, ... }, ... } } } ``` **Delivery 2:** ```json theme={null} { "eventType": "VEHICLE_STATE", "data": { "triggers": ["TractionBattery.StateOfCharge"], "signals": { "TractionBattery.StateOfCharge": { "value": 85, ... }, ... } } } ``` **Delivery 3:** ```json theme={null} { "eventType": "VEHICLE_STATE", "data": { "triggers": ["TractionBattery.Range"], "signals": { "TractionBattery.Range": { "value": 250, ... }, ... } } } ``` **The behavior depends on the vehicle manufacturer.** Some OEMs batch updates, while others stream individual changes. Your integration should handle both patterns. ## Payload Size Limits The maximum webhook payload size is **50 KB**. This limit applies to the entire JSON payload. Most webhook payloads are well under this limit. A typical `VEHICLE_STATE` event with 10-20 signals usually under 5 KB, depending on the signals. If you're approaching this limit, consider: * Reducing the number of signals in your webhook subscription * Splitting data across multiple webhooks with different signal sets ## Delivery Logs & Monitoring ### Dashboard Logs View delivery attempt history in the [Smartcar Dashboard](https://dashboard.smartcar.com) under the **Logs** tab. The logs show: * **Successful deliveries**: Events that received a 2xx response * **Failed deliveries**: Events that failed after all retry attempts * **Individual retry attempts**: Each attempt with timestamp, status code, and response time * **Signal names**: The signals that were included in the webhook payload Use the dashboard logs to: * Debug delivery failures * Monitor webhook health * Track which signals triggered events * Verify retry behavior ### Delivery Metrics Track key metrics to ensure webhook reliability: * **Success rate**: Percentage of events delivered successfully on first attempt * **Retry rate**: Percentage of events requiring retries * **Average response time**: How quickly your endpoint responds * **Failure patterns**: Common error codes or failure reasons Set up monitoring alerts for: * Success rate drops below 95% * Average response time exceeds 5 seconds * Consecutive failures for the same vehicle ## Webhook Lifecycle ### Disabling Webhooks When you disable a webhook in the Smartcar Dashboard: * Smartcar **stops monitoring** subscribed vehicles for changes * Smartcar **stops attempting deliveries** immediately * No events are queued or stored while the webhook is disabled ### Re-enabling Webhooks When you re-enable a webhook: * Smartcar **resumes monitoring** subscribed vehicles for changes * The next event will include a `FIRST_DELIVERY` trigger with current signal values * **Not supported:** Events that occurred while disabled are not retroactively delivered **No event history while disabled.** Smartcar does not queue events during the disabled period. When you re-enable, you'll receive current state, not historical changes. ## Delivery Guarantees ### At-Least-Once Delivery Smartcar guarantees **at-least-once delivery** for all webhook events. This means: * **Guaranteed:** You will receive every event at least once (unless all retry attempts fail) * **Expected:** You may receive the same event multiple times * **Not guaranteed:** Events are not delivered in order (see below) ### Ordering **Events are not guaranteed to be delivered in order.** Due to network conditions, retry behavior, and distributed systems, events may arrive out of sequence. For example: 1. Vehicle's state of charge changes from 50% → 60% at 10:00 AM 2. Vehicle's state of charge changes from 60% → 70% at 10:05 AM 3. You might receive the 70% event before the 60% event **Use timestamps to establish order.** Each signal includes `meta.oemUpdatedAt` and `meta.fetchedAt` timestamps. Compare these values to determine the actual sequence of events: ```javascript theme={null} function isNewerThan(signalA, signalB) { return signalA.meta.oemUpdatedAt > signalB.meta.oemUpdatedAt; } ``` ### Duplicate Prevention While Smartcar delivers each event at least once, duplicates can occur due to: * **Retry attempts**: If your endpoint doesn't return a 2xx response within 15 seconds, Smartcar will retry the same event, resulting in duplicate deliveries * **Network issues**: Temporary connectivity problems may cause duplicate sends * **Distributed systems**: Race conditions in distributed infrastructure **Most duplicates are caused by slow or failed responses.** If your endpoint takes longer than 15 seconds to respond or returns a non-2xx status code, Smartcar will retry the delivery. Always return a 2xx response quickly to minimize duplicates. #### Rare Edge Case: Multiple Deliveries During Confirmation In extremely rare circumstances, you may receive multiple deliveries for the same error **even when responding quickly**. This can occur when: 1. Smartcar detects a vehicle error (e.g., expired authorization) 2. A webhook delivery is initiated to your endpoint 3. **While confirming delivery**, the same error is detected again (e.g., another API request encounters the same expired authorization) 4. This triggers a second, independent delivery with a **different `eventId`** **Key characteristics:** * Happens during a narrow time window (typically milliseconds to seconds) * Results in **different `eventId` values** for what is logically the same error condition * Each delivery is a legitimate, distinct event from Smartcar's perspective * Most common with `VEHICLE_ERROR` events when multiple operations encounter the same error state **How to handle this:** If your application is sensitive to duplicate error notifications (e.g., sending user alerts), implement additional deduplication. Use a combination of `userId`, `vehicleId`, error `code`, and a time window (2-5 minutes) in addition to standard `eventId` deduplication. **This edge case is rare in practice.** Most applications won't need special handling beyond standard `eventId` deduplication. Always implement idempotent processing using the unique `eventId` for standard deduplication. See [Reliability Best Practices](/integrations/webhooks/best-practices/reliability#implement-idempotency) for implementation patterns. ## Latency & Timing ### Understanding Webhook Latency Webhook delivery latency consists of two components: **1. Detection Latency** - Time for Smartcar to detect a vehicle data change * Depends on the vehicle manufacturer's integration and data reporting frequency * Varies significantly by OEM (from seconds to minutes) * Outside of Smartcar's control **2. Delivery Latency** - Time from detection to HTTP delivery * Smartcar delivers webhooks within seconds of detecting a change * Actual delivery time depends on network conditions and your endpoint's location **Total end-to-end latency** = Detection latency (OEM-dependent) + Delivery latency (typically seconds) The detection latency varies by manufacturer and is the primary factor in total webhook latency. Once Smartcar detects a change, delivery occurs quickly. ### Delivery Latency Webhook deliveries typically occur within **seconds** of the triggering event. Latency depends on: * **Vehicle OEM latency**: Time for the vehicle manufacturer to report data to Smartcar * **Change detection**: Time for Smartcar to detect a signal value change * **Network latency**: Time to deliver the HTTP request to your endpoint Most deliveries complete within 1-5 seconds of Smartcar detecting a change, but OEM latency can vary significantly by manufacturer. ### Event Freshness Each signal includes two timestamps to help you understand data freshness: * **`meta.oemUpdatedAt`**: When the vehicle manufacturer recorded the value (Unix timestamp in milliseconds) * **`meta.fetchedAt`**: When Smartcar retrieved the value from the OEM (Unix timestamp in milliseconds) The difference between these timestamps indicates how fresh the data is from the vehicle's perspective. ## Network Requirements ### HTTPS & SSL All webhook endpoints must: * Use HTTPS (not HTTP) * Have a valid SSL/TLS certificate * Support TLS 1.2 or higher Self-signed certificates and internal corporate CAs are not supported. ### Public Internet Access Your webhook endpoint must be accessible from the public internet. Smartcar cannot deliver to: * `localhost` or `127.0.0.1` * Private IP addresses (10.x.x.x, 192.168.x.x, 172.16-31.x.x) * Internal corporate networks without public DNS ### IP Addresses Smartcar sends webhook requests from **public IPv4 addresses** that may change over time. We do not publish a static list of IP addresses. **Avoid IP-based firewall rules.** Instead of allowlisting specific IP addresses, use signature verification to authenticate webhook requests. See [Payload Verification](/integrations/webhooks/payload-verification). ### Firewall Configuration If you must use firewall rules: * Allow inbound HTTPS (port 443) from any IP * Use signature verification for authentication * Monitor for delivery failures that might indicate blocked IPs ## Error Handling ### Temporary vs Permanent Failures **Temporary failures** (worth retrying): * 500, 502, 503, 504 status codes * Connection timeouts * Temporary DNS failures * Network blips **Permanent failures** (not worth retrying): * 400, 401, 403, 404, 405 status codes * Invalid SSL certificates * DNS resolution failures for non-existent domains Smartcar retries both types, but you should fix permanent failures quickly to avoid dropped events. ### Monitoring Delivery Health Monitor your webhook delivery success rate in the [Smartcar Dashboard](https://dashboard.smartcar.com) **Logs** tab. High failure rates may indicate: * Your endpoint is down or unreachable * Responses are too slow (> 15 seconds) * Your endpoint is rejecting requests (4xx errors) * SSL certificate issues Set up alerts for: * Delivery success rate drops below 95% * Average response time exceeds 5 seconds * Consecutive delivery failures (3+) ## Best Practices To build a reliable webhook integration, follow these essential practices: 1. **Respond Quickly** - Return `200 OK` within 200ms. Queue the payload and process asynchronously to avoid timeouts. 2. **Validate Signatures** - Always verify the `SC-Signature` header before processing payloads to ensure authenticity. 3. **Handle Duplicates** - Use `eventId` to detect and skip duplicate deliveries due to retries or network issues. 4. **Use Timestamps** - Compare `meta.oemUpdatedAt` values to establish correct event ordering, as events may arrive out of sequence. 5. **Monitor Failures** - Track delivery success rates and set up alerts for anomalies or consecutive failures. 6. **Test Error Cases** - Verify your retry and error handling logic with test scenarios during development. For detailed implementation guidance, see our comprehensive [Best Practices Guide](/integrations/webhooks/best-practices/overview). *** ## Related Resources Complete reference for all webhook event types and payloads How to verify webhook signatures for security Handle duplicate deliveries and ensure idempotent processing Step-by-step guide to implementing a webhook endpoint --- # Source: https://smartcar.com/docs/getting-started/how-to/detect-charging-session.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # How to Detect and Process Charging Sessions with Webhooks > Learn how to use Smartcar webhooks to detect when a vehicle starts and ends charging, and how to process charging session data. Smartcar webhooks make it easy to detect and process vehicle charging sessions in real time. This guide explains how to configure your webhook, handle charging events, and process charging session data in your backend. In the [Smartcar Dashboard](https://dashboard.smartcar.com/integrations), create or edit a webhook integration. Under Triggers, select the following events:
  • Charge.IsCharging
  • Charge.IsChargingCableConnected
These signals will act as triggers for detecting when a vehicle starts and stops charging and when it is plugged in or unplugged. Whenever these signals change, Smartcar will send a webhook event to your configured endpoint. Next, you'll configure your **data**. This is the information you want to receive in your webhook payload every time you receive a webhook event. Triggers are included by default, but you can also add additional signals to the data payload, such as:
  • Charge.StateOfCharge (included as a trigger)
  • Charge.ChargingCurrent (included as a trigger)
  • Charge.ActiveLimit
  • Charge.Amperage
  • Charge.Voltage
  • Charge.Wattage
  • Charge.EnergyAdded
  • Charge.TimeToComplete
  • TractionBattery.Range
  • TractionBattery.NominalCapacity
  • Location.PreciseLocation
These data signals will be delivered for every webhook event, allowing you to track the state of charge and other relevant metrics while the vehicle is charging. Next, provide your webhook URL where Smartcar will send the events. Make sure your endpoint is publicly accessible and can handle POST requests. You can choose to auto enroll all your vehicles to this webhook or manually subscribe vehicles later (you can do this from the Dashboard). For this guide, select "don't subscribe any vehicles". Now it is time to save and verify your webhook.
Smartcar will send a verification request to your endpoint, which you must respond to with a 200 OK status code to complete the setup (see [Webhook Verification guide](/integrations/webhooks/callback-verification)). Once verified, you will start to receive vehicle data for the vehicles you have subscribed to this webhook. For this guide, we chose not to auto subscribe vehicles, so let's head over to the [Smartcar Dashboard](https://dashboard.smartcar.com/vehicles) to manually subscribe a vehicle to your webhook. Select a vehicle from your list of connected vehicles and click on the three dots action menu to the right of the row and click subscribe. Select your newly created webhook from the options and click subscribe. Smartcar Dashboard showing how to subscribe a vehicle to a webhook.
At this point, your webhook is fully configured to receive charging events from the subscribed vehicle. Now let's handle the incoming webhook events in your backend. Every webhook will include an `eventId` and an `eventType` field. The `eventType` will indicate the type of event that occurred, such as `VEHICLE_STATE` or `VEHICLE_ERROR`. Your handler should gracefully handle both event types. For `VEHICLE_STATE` events, you will receive the updated vehicle data. For `VEHICLE_ERROR` events, you may want to log the error. For `VEHICLE_STATE` events, you will receive the data in a `data` property of the payload. There will also be an array of signals under a `triggers` property that caused the event to be sent. Lastly, you will also receive a `meta` property with additional context about the event, such as the webhook ID, name, delivery ID, delivery timestamp, etc. ### How to track charging sessions When a vehicle starts charging, you will receive a webhook event with the `eventType` of `VEHICLE_STATE` and the `Charge.IsCharging` signal set to `true`. When the vehicle stops charging, you will receive another event with `Charge.IsCharging` set to `false`. You can use these events to track the start and end of each charging session. Example event payload: ```json theme={null} { "eventId": "a7738a15-7ee2-40b3-9815-823d146230cd", "eventType": "VEHICLE_STATE", "data": { "user": { "id": "deee49b6-d638-4be4-82dc-121ea613eed9" }, "vehicle": { "id": "829e30ab-5a13-40b5-9f8a-8538af86ed95", "make": "Tesla", "model": "Model 3", "year": 2020 }, "signals": [ { "code": "charge-ischarging", "name": "IsCharging", "group": "Charge", "body": { "value": true }, "status": { "value": "SUCCESS" }, "meta": { "oemUpdatedAt": 1754365413366, "retrievedAt": 1754365413366 } } ], "triggers": [ { "type": "SIGNAL_UPDATED", "signal": { "code": "charge-ischarging", "name": "IsCharging", "group": "Charge" } } ], "meta": { "webhookId": "f1c2d3e4-5678-90ab-cdef-1234567890ab", "webhookName": "My Charging Webhook", "deliveryId": "b1c2d3e4-5678-90ab-cdef-1234567890ab", "deliveryTimestamp": "2024-08-04T17:00:00Z", "mode": "LIVE", "signalCount": 1 } } } ``` Tip: Always validate the webhook signature to ensure the request is from Smartcar. *** ## What’s Next * [How to Configure Permissions](/getting-started/how-to/configure-permissions) * [How to Manage API Tokens](/getting-started/how-to/manage-api-tokens) * [API Reference: Webhooks](/api-reference/webhooks/subscribe-webhook) --- # Source: https://smartcar.com/docs/help/oem-integrations/tesla/developers.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Tesla Permission Info > This page has information regarding Smartcar's upgraded Tesla integration. ## Updating access with Tesla You can use either of the following URLs to prompt users for more Tesla permissions in the event you need additional access from the vehicle owner due to: * A [PERMISSION](/errors/api-errors/permission-errors) error from API * A [CONNECTED\_SERVICES\_ACCOUNT:PERMISSION](/errors/api-errors/connected-services-account-errors#permission) error from API * Needing access to an endpoint out of scope for your existing permissions If one or more of the Smartcar scopes you pass map to a new Tesla permission(s) for the account, the user will be prompted to update access after they log in with Tesla. This flow sends a new authorization code to your callback URI in order to fetch a new access and refresh token. ``` https://connect.smartcar.com/oauth/{path}? response_type=code &make=TESLA &client_id=8229df9f-91a0-4ff0-a1ae-a1f38ee24d07 &scope=read_odometer control_security &redirect_uri=https://example.com ``` | name | type | required | description | | --------------- | --------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `response_type` | `string` | true | This should be set to `code`. | | `make` | `string` | true | Specifies the brand to update access to. Currently, the only make available for this flow is `TESLA`. | | `client_id` | `string` | true | The application’s unique identifier. This is available on the credentials tab of the Smartcar Dashboard. | | `scope` | `[permissions]` | true | A space-separated list of permissions that your application is requesting access to. The valid permission names can be found in the [permissions](/api-reference/permissions) section. When reauthenticating, the user will be required to grant the corresponding OEM permissions before being able to exit the flow. | | `redirect_uri` | `string` | true | Required if using the `/authorize` route for Smartcar to return an authorization code. | This flow **will not** send back an authorization code to fetch a new refresh and access token, or redirect the user back to your application. Continue to use the access and refresh tokens you have on file for associated vehicles. ``` https://connect.smartcar.com/oauth/reauthenticate? response_type=vehicle_id &make=TESLA &client_id=8229df9f-91a0-4ff0-a1ae-a1f38ee24d07 &scope=read_odometer control_security ``` | name | type | required | description | | --------------- | --------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `response_type` | `string` | true | This should be set to `vehicle_id` . | | `make` | `string` | true | Specifies the brand to revoke access to. Currently, the only make available for this flow is `TESLA`. | | `client_id` | `string` | true | The application’s unique identifier. This is available on the credentials tab of the Smartcar Dashboard. | | `scope` | `[permissions]` | true | A space-separated list of permissions that your application is requesting access to. The valid permission names can be found in the [permissions](/api-reference/permissions) section. When reauthenticating, the user will be required to grant the corresponding OEM permissions before being able to exit the flow. | ## Requiring Tesla Permissions To ensure users select the necessary permissions with Tesla before being able to connect their vehicle via Smartcar, please append the `required:` prefix to Smartcar scopes in your Connect URL e.g. `required:read_location`. As a result if they do not select the necessary permissions with Tesla, they will see the following screen and be prompted to return to Tesla to update their permissions. ## Permission Mappings Tesla provides a limited set of permissions. To ensure vehicle data is shared only with explicit consent, Smartcar has mapped Tesla’s permissions into its existing more granular options. For example, granting access to “vehicle commands” in a Tesla account allows an application to start or stop charging, lock or unlock doors, enable or disable Sentry Mode, and more. Smartcar separates these permissions so that applications must request access to control charging separately from access to vehicle security, control navigation, etc. Smartcar does not use or share vehicle data beyond the permissions listed in this table. An application with the ability to control the charge status of a vehicle, does not have access to control other aspects of the car unless explictly requested and granted by a vehicle owner. | Smartcar Permission | Tesla Permission | | ---------------------------- | --------------------------------------------------- | | `control_charge` | Vehicle Charge Management (vehicle\_charging\_cmds) | | `control_climate` | Vehicle Commands (vehicle\_cmds) | | `control_navigation` | Vehicle Commands (vehicle\_cmds) | | `control_pin` | Vehicle Commands (vehicle\_cmds) | | `control_security` | Vehicle Commands (vehicle\_cmds) | | `control_trunk` | Vehicle Commands (vehicle\_cmds) | | `read_battery` | Vehicle Information (vehicle\_device\_data) | | `read_charge_records` | Vehicle Charge Management (vehicle\_charging\_cmds) | | `read_charge` | Vehicle Information (vehicle\_device\_data) | | `read_climate` | Vehicle Information (vehicle\_device\_data) | | `read_compass` | Vehicle Information (vehicle\_device\_data) | | `read_engine_oil` | Vehicle Information (vehicle\_device\_data) | | `read_extended_vehicle_info` | Vehicle Information (vehicle\_device\_data) | | `read_fuel` | Vehicle Information (vehicle\_device\_data) | | `read_location` | Vehicle Location (vehicle\_location) | | `read_odometer` | Vehicle Information (vehicle\_device\_data) | | `read_security` | Vehicle Information (vehicle\_device\_data) | | `read_speedometer` | Vehicle Information (vehicle\_device\_data) | | `read_thermometer` | Vehicle Information (vehicle\_device\_data) | | `read_tires` | Vehicle Information (vehicle\_device\_data) | | `read_user_profile` | Profile Information (user\_data) | | `read_vehicle_info` | Vehicle Information (vehicle\_device\_data) | | `read_vin` | Vehicle Information (vehicle\_device\_data) | --- # Source: https://smartcar.com/docs/help/diagnostic-systems.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Diagnostic Systems > To support our System Status endpoint, reference the below list of unified systems. The [System Status](https://smartcar.com/docs/api-reference/get-system-status) endpoint returns a list of systems reported by any given vehicle, as well as their current state which may be "OK" or "ALERT". ## System IDs | | | | --------------------------------- | --------------------------------------------------------- | | `SYSTEM_ABS` | Antilock Braking Systems | | `SYSTEM_ACTIVE_SAFETY` | Active Safety Systems | | `SYSTEM_AIRBAG` | Airbag Systems | | `SYSTEM_BRAKE_FLUID` | Brake Fluid Level | | `SYSTEM_DRIVER_ASSISTANCE` | Driver Assistance Systems | | `SYSTEM_EMISSIONS` | Emissions Systems | | `SYSTEM_ABS` | Antilock Braking Systems | | `SYSTEM_ENGINE` | Engine Systems | | `SYSTEM_EV_BATTERY_CONDITIONING` | EV Battery Conditioning Systems | | `SYSTEM_EV_CHARGING` | EV Charging Systems | | `SYSTEM_EV_DRIVE_UNIT` | EV Drive Unit Systems | | `SYSTEM_EV_HV_BATTERY` | EV High-Voltage Battery Systems | | `SYSTEM_LIGHTING` | Lighting Systems | | `SYSTEM_MIL` | Malfunction Indiciator Lamp Systems (Check Engine Lights) | | `SYSTEM_OIL_LIFE` | Oil Life Systems | | `SYSTEM_OIL_PRESSURE` | Oil Pressure Systems | | `SYSTEM_OIL_TEMPERATURE` | Oil Temperature Systems | | `SYSTEM_TELEMATICS` | Telematics Systems | | `SYSTEM_TIRE_PRESSURE` | Tire Pressure Systems | | `SYSTEM_TIRE_PRESSURE_MONITORING` | Tire Pressure MonitoringSystems | | `SYSTEM_TRANSMISSION` | Transmission Systems | | `SYSTEM_WASHER_FLUID` | Washer Fluid Systems | | `SYSTEM_WATER_IN_FUEL` | Water in Fuel Detection Systems | --- # Source: https://smartcar.com/docs/api-reference/signals/diagnostics.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Diagnostics Signals ### ABS Signal code: `diagnostics-abs` A diagnostic category representing the Anti-lock Braking System (ABS). A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ```json Example theme={null} { "status": "OK", "description": "ABS system functioning normally" } ``` ### Active Safety Signal code: `diagnostics-activesafety` Encompasses the vehicle's advanced safety technologies designed to prevent or mitigate potential accidents. A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### Airbag Signal code: `diagnostics-airbag` The system that monitors the vehicle's airbag readiness and functionality. A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### Brake Fluid Signal code: `diagnostics-brakefluid` The system that monitors the vehicle's brake fluid condition and levels. A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### DTCCount Signal code: `diagnostics-dtccount` The total number of active Diagnostic Trouble Codes (DTCs) currently present in the vehicle's systems. ```json Example theme={null} { "unit": "count", "value": 2 } ``` ### DTCList Signal code: `diagnostics-dtclist` An array containing detailed information about each active Diagnostic Trouble Code (DTC) in the vehicle. Array of Diagnostic Trouble Code (DTC) entries. The specific alphanumeric code identifying a particular diagnostic trouble code (DTC). The precise date and time when the specific diagnostic trouble code (DTC) was first detected or logged by the vehicle's onboard diagnostic system. ```json Example theme={null} { "values": [ { "code": "P0300", "timestamp": "2023-10-15T08:00:00Z" }, { "code": "P0171", "timestamp": "2023-10-15T08:00:00Z" } ] } ``` ### Driver Assistance Signal code: `diagnostics-driverassistance` The system that monitors the vehicle's advanced driver assistance technologies. A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### EVBattery Conditioning Signal code: `diagnostics-evbatteryconditioning` The system that monitors the electric vehicle's high-voltage battery thermal management and conditioning. A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### EVCharging Signal code: `diagnostics-evcharging` The system that monitors the electric vehicle's charging processes and infrastructure. A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### EVDrive Unit Signal code: `diagnostics-evdriveunit` The system that monitors the electric vehicle's drive unit performance and functionality. A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### EVHVBattery Signal code: `diagnostics-evhvbattery` The system that monitors the electric vehicle's high-voltage battery health and performance. A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### Emissions Signal code: `diagnostics-emissions` The system that monitors the vehicle's exhaust emissions and pollution control mechanisms. A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### Lighting Signal code: `diagnostics-lighting` The system that monitors the vehicle's exterior and interior lighting functionality. A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### MIL Signal code: `diagnostics-mil` The system that monitors the vehicle's Malfunction Indicator Lamp (MIL) status. A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### Oil Life Signal code: `diagnostics-oillife` The system that monitors the vehicle's engine oil condition and remaining useful life. A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### Oil Pressure Signal code: `diagnostics-oilpressure` The system that monitors the vehicle's engine oil pressure and lubrication system performance. A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### Oil Temperature Signal code: `diagnostics-oiltemperature` The system that monitors the vehicle's engine oil temperature and thermal conditions. A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### Telematics Signal code: `diagnostics-telematics` The system that monitors a vehicle's connectivity A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### Tire Pressure Signal code: `diagnostics-tirepressure` The system that monitors tire pressure levels A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### Tire Pressure Monitoring Signal code: `diagnostics-tirepressuremonitoring` The status of the tire pressure monitoring system. A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### Transmission Signal code: `diagnostics-transmission` The system that monitors the vehicle's transmission A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### Washer Fluid Signal code: `diagnostics-washerfluid` The system that monitors the vehicle's washer fluid reservoir A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. ### Water In Fuel Signal code: `diagnostics-waterinfuel` The system that monitors the presence of water in the vehicle's fuel system A ENUM indicating the current operational condition of the related system. (ALERT, OK) **Possible values:** `ALERT`, `OK` A description of the system's status, if provided by the OEM. --- # Source: https://smartcar.com/docs/help/oem-integrations/bmw/energy-integration.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # BMW Energy APIs for European Markets > Access charging data and remote charge control for BMW and MINI EVs in Europe through Smartcar's BMW Energy API integration. Smartcar's integration with BMW's Energy API gives you access to charging data and remote charge control for BMW and MINI electric vehicles across Europe. This integration is designed for energy providers building smart charging, demand response, and fleet management solutions. ## Capabilities With this integration, you can: * **Monitor charging status** — Get visibility into charging state, energy flow, and battery level. * **Control AC charging** — Remotely start and stop AC charging sessions. * **Build smart charging solutions** — Support use cases like dynamic load balancing, demand response, off-peak optimization, and charge cost tracking. ## Supported Data The BMW Energy integration provides charging and battery data through Smartcar's standardized signal schema. | Data Category | Available Data | | ------------------- | --------------------------------------------------------------------------------- | | Charging | Connector type, cable connection status, charging state, detailed charging status | | Charging Parameters | Charge timers, charge limits, time to complete, charging wattage | | Battery | State of charge (SOC), remaining electric range, nominal capacity | | Location | High-precision GPS position (when vehicle is within Geofence) | ### Smartcar Signals * [`Charge.ChargingConnectorType`](/api-reference/signals/charge#charging-connector-type) * [`Charge.IsChargingCableConnected`](/api-reference/signals/charge#is-charging-cable-connected) * [`Charge.IsCharging`](/api-reference/signals/charge#is-charging) * [`Charge.DetailedChargingStatus`](/api-reference/signals/charge#detailed-charging-status) * [`Charge.ChargeTimers`](/api-reference/signals/charge#charge-timers) * [`Charge.ChargeLimits`](/api-reference/signals/charge#charge-limits) * [`Charge.TimeToComplete`](/api-reference/signals/charge#time-to-complete) * [`Charge.Wattage`](/api-reference/signals/charge#wattage) * [`TractionBattery.StateOfCharge`](/api-reference/signals/tractionbattery#state-of-charge) * [`TractionBattery.Range`](/api-reference/signals/tractionbattery#range) * [`TractionBattery.NominalCapacity`](/api-reference/signals/tractionbattery#nominal-capacities) * [`Location.PreciseLocation`](/api-reference/signals/location#location) ### Commands * [Start Charge](/api-reference/evs/control-charge) * [Stop Charge](/api-reference/evs/control-charge) ## Coverage ### Supported Vehicles This integration supports all Battery Electric Vehicles (BEV) and Plug-in Hybrid Electric Vehicles (PHEV) from BMW and MINI. ### Supported Markets The integration is available in 17 European markets: Austria, Belgium, Denmark, Finland, France, Germany, Great Britain, Ireland, Italy, Luxembourg, Netherlands, Norway, Poland, Portugal, Spain, Sweden, and Switzerland. ## Geofence restriction Data and commands are only available when the vehicle is within approximately 200 meters of the consented address. Data streaming from BMW to Smartcar and from Smartcar to your app automatically stops when the vehicle exits the Geofence. When vehicle owners grant consent, they specify a single address where managed charging will occur. This Geofence defines where data streaming and charge commands are available. This design ensures data privacy and compliance with BMW's requirements. ## Consent Flow Vehicle owners grant consent through the BMW Connected Drive Portal as part of the Smartcar Connect flow. During this process, they: 1. Log in with their BMW ID 2. Select the vehicle(s) to connect 3. Specify the address where managed charging will occur 4. Accept BMW's terms for data sharing ## Limitations Keep these constraints in mind when building your integration. * **Charging-only scope** — This integration focuses on charging and battery data. Broader vehicle data (odometer, tire pressure, etc.) is not available through the Energy API. * **Geofence-restricted** — Data and commands only work within the \~200m Geofence radius. * **AC charging only** — Remote charge control is limited to AC charging sessions. * **No public charging data** — Data from public charging sessions is not supported. * **No cross-border data** — Cross-border data streaming is not currently supported. * **Charge stop rate limit** — BMW enforces a rolling 30-day limit of 80 charge stop commands per vehicle. If you have any questions about these limitations or need additional capabilities, please our support team. We're continuously working with BMW to expand the integration's features and coverage. --- # Source: https://smartcar.com/docs/help/oem-integrations/tesla/faqs.md # Source: https://smartcar.com/docs/help/faqs.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Frequently Asked Questions (FAQs) Below you'll find answers to some of the most frequently asked questions about Smartcar. Smartcar does not build applications ourselves. Rather, we provide the building blocks that our customers need in order to build applications for a variety of use cases. Yes. For instance, if you own a VW, you will need to have Car-Net activated in the US or WeConnect in Europe. You can read more about connected service subscriptions [here](/help/brand-subscriptions). Take a look at our [Global Compatibility page](https://smartcar.com/global/) for the latest information on where Smartcar works. Smartcar is always expanding and working hard to ensure supported countries are stable and reliable. If your country is not currently supported, but you think we'll be a good fit for your use case, [schedule a demo](https://smartcar.com/demo/) and let's see how we can help you! [Smartcar Connect](/connect/what-is-connect) is available in English, Danish, German, Spanish (Spain), Spanish (Latin America), French, Italian, Dutch, Norwegian, and Swedish providing vehicle owners a native experience as they onboard vehicles to your platform. Smartcar will always try to pull the latest data point from any given vehicle. Each API response includes an [sc-data-age header](https://smartcar.com/docs/api#response-headers) that will contain the timestamp of when that data was last saved. Although each OEM saves data at different times, the data age header should not be older than the last time the vehicle was used. For a list of compatible vehicles, visit [our website](https://smartcar.com/product/compatible-vehicles/). Smartcar is compatible with **161 million vehicles** across the US, Canada and Europe. **United States**
Smartcar is compatible with **29 car brands** in the United States. **Europe**
Smartcar is compatible with **19 car brands** in Europe. **Canada**
Smartcar is compatible with **21 car brands** in Canada.
**If your make isn't supported...** We work hard to ensure that supported brands are stable and reliable, which takes time. If you don't see your make on our [compatibility page](https://smartcar.com/product/compatible-vehicles/) but you would like it to be, reach out to [support@smartcar.com](mailto:support@smartcar.com) to see how you can help speed up the process! **If we support your make, but not your model...** We might just need to do some additional testing. Sign up to our [research fleet](https://smartcar.com/research-fleet) and we'll reach out to see what we can do for you! **If we support your make, model, but not your year...** The majority of automakers only started adding internet connectivity to their cars around 2014. If you're able to access your car through a smartphone application and believe it should be supported, reach out to us and we'll be happy to take a look. While on-board diagnostics dongles are versatile and useful for tracking and diagnostics of many kinds, they are far from ideal when it comes to mileage verification. They can be inaccurate, inconvenient, expensive and unreliable.Smartcar is only one example of a pure software alternative that uses API technology to offer the perfect mileage verification solution to auto insurance companies. Compared with traditional OBD-II devices, our API is accurate, cost efficient and tamper-resistant. You can read more about why using our API is a great choice on our [blog](https://smartcar.com/blog/obd-mileage-verification/). In the event that we receive a response from the OEM after the connection is closed, we will show the error code and error type we would have responded with on the Dashboard if the connection had been kept open.
--- # Source: https://smartcar.com/docs/help/feature-request.md > ## Documentation Index > Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Submit a Feature Request ## Help Us Improve Smartcar! Your feedback shapes our future. Have an idea or improvement you’d love to see? Submit your suggestions using the form below, and let us know how we can better serve your needs. If you have trouble seeing the form below, please visit [this link](https://smartcarapi.notion.site/215f1477e9d380538219cb34866b8540?pvs=105) to submit your feature request.