Authorize a new connected vehicle

With a pending connected vehicle, the authorization process can be continued. Make sure to follow the provider-specific instructions in the first step before continuing. It's also recommend to create a subscription, as explained in the previous section.

Mutation

To authorize a new connected vehicle provide the id argument. Each provider requires an options argument. Details can be found below.

Enode

After completing the make specific authorization flow initiated by authorization_url, the authorizeConnectedVehicle operation should be executed to validate that the vehicle is successfully authorized. The options argument can be an empty object.

When using Enode it is not possible to have multiple vehicles attached to the same OEM account (eg. Tesla). This scenario will return CONNECT_MULTIPLE_VEHICLES_NOT_ALLOWED and needs to be handled explicitly in your application.

Arguments

input input_object AuthorizeConnectedVehicleInput

Other fields

id non_null ID

Unique ID of the connected vehicle

vehicle_id non_null ID

Unique ID of the vehicle

status non_null ConnectedVehicleStatus

Status of the connected vehicle

authorization_url scalar String

URL to connect the vehicle to the connectivity provider

provider non_null CarConnectivityProvider

Connectivity provider

scope list ConnectScope

Scope for accessing the vehicle

label scalar String

Custom label for a connected vehicle that can be assigned by a user

vin scalar String

Vehicle identification number, unique identifier for a vehicle

Response

A response can either contain a data or an errors object. The response header will always return 200 as a status code.

Data object

When successful, a data object will be returned with the requested fields. If there are no fields present the data object will return the operation name with the appropriate return type. If the operation was a query, this output will be an object of the schema’s query root type; if the operation was a mutation, this output will be an object of the schema’s mutation root type.

Error object

If unsuccessful, an errors object will be returned with more details in the extensions object. The error object can contain any of the following objects.

Error

AUTH_CODE_INVALID

The provided auth code is not valid

Error

AUTH_TOKEN_EXPIRED

The token you provided is expired

Error

AUTH_TOKEN_INVALID

The token you provided is invalid

Error

CONNECT_MULTIPLE_VEHICLES_NOT_ALLOWED

There seem to be more than 1 vehicle on on the vendor account. This is currently unsupported.

Error

CONNECT_PROVIDER_NOT_ALLOWED

The Connect provider $PROVIDER is not configured for your client id. Please contact customer support to enable it!

Error

CONNECTED_VEHICLE_FORBIDDEN

The vehicle does not seem to be authorized yet. To complete this action, first complete the authorization flow.

Error

CONNECTED_VEHICLE_NO_PENDING_STATUS

The connected vehicle you are trying to authorize does not have status pending

Error

CONNECTED_VEHICLE_NOT_FOUND

The connected vehicle was not found