OAuth2

The OAuth2 API provides you an interface to create access tokens. The raw Swagger specification is available at https://github.com/highmobility/open-api-specifications/blob/main/hm-oauth-rest-v1.yml

Creates and renews AccessTokens

post
/v1/access_tokens

This API implements rfc7009, rfc7636 and rfc6749

Body
grant_typestring · enumRequired

Grant Type.

Possible values:
codestringOptional

Authorization code that the client previously received from the authorization server. Required when grant_type is authorization_code.

redirect_uristringOptional

The redirect URI in the token request must be an exact match of the redirect URI that was used when generating the authorization code. Required for when grant_type is authorization_code.

refresh_tokenstringOptional

Refresh token that the client previously received from the authorization server. Required when grant_type is refresh_token.

client_idstringRequired

Client ID used for authentication.

client_secretstringOptional

Client Secret used for authentication, only used in Server-Side Apps

code_verifierstringOptional

Code verifier(PKCE), only used in Mobile and Native Apps

client_assertionstringOptional

Only used with the combination of client_credentials grant_type and client_assertion_type

client_assertion_typestring · enumOptional

Only used with the combination of client_credentials grant_type and client_assertion

Possible values:
Responses
chevron-right
200

Success

application/json

Access Tokens

validity_start_datestringOptional

Date and Time in ISO8601 format example: '2018-11-06T10:20:37.094533Z'

validity_end_datestringOptional

Date and Time in ISO8601 format example: '2018-11-06T10:20:37.094533Z'

token_typestringRequired

Token type

scopestringOptional

List of scopes

refresh_tokenstringOptional

Refresh token should be used after the access token is expired to fetch a new access token

expires_inintegerRequired

Expiration time in seconds

authorization_idstringOptional

Authorization Id could be used later on in authorization_changed Webhook

access_tokenstringRequired

Access token

statusstring · enumOptional

In BMW and MINI case, the status is pending until the car owner grants access in BMW ConnectedDrive Portal

Possible values:
post
/v1/access_tokens

Revokes AccessTokens

delete
/v1/access_tokens

This API implements rfc7009

Body
tokenstringRequired

Access Token or Refresh Token that will be used in the revocation.

client_idstringRequired

Client ID used for authentication.

client_secretstringRequired

Client Secret used for authentication, only used in Server-Side Apps

token_type_hintstring · enumOptional

Token hint used to identify which type of token is inside the token property.

Possible values:
Responses
chevron-right
200

Success

No content

delete
/v1/access_tokens

No content

Checks AccessTokens vehicleinfo

get
/v1/vehicleinfo

Returns vehicleinfo associated with access token

Header parameters
Authorizationstring · uuidRequired

Bearer token

Responses
chevron-right
200

Success

application/json

Vehicle Info

vinstringRequired

VIN associated with the access token

substringRequired

sub associated with the access token

get
/v1/vehicleinfo

Last updated

Was this helpful?