Skip to main content

Ocp-Apim-Subscription-Key

The Ocp-Apim-Subscription-Key is an essential component for authenticating and authorizing requests to the Ctrack API. This key uniquely identifies your subscription and allows you to access the API services provided by Ctrack.

What is the Ocp-Apim-Subscription-Key?

The Ocp-Apim-Subscription-Key is used in combination with other authentication mechanisms like JWTs (from the x-token header) to verify that your API requests are associated with a valid subscription. This key ensures that only authorized users can interact with specific API endpoints and services.

You must include the subscription key in the headers of your API requests, along with the JWT token, to successfully authenticate and receive the data or services you are requesting.

  • Identify Your Subscription: The key is tied to your subscription level, which may affect your rate limits and available features.
  • Monitor API Usage: It allows us to monitor your API usage, ensuring compliance with your plan’s limits and providing insights into how the API is being used.
  • Control Access: The subscription key is necessary to gain access to API methods. Requests without a valid key will be rejected with a 401 Unauthorized or 403 Forbidden error.

Request Example

Include the ocp-apim-subscription-key in the headers of every API request:

GET /api/v1/vehicles
x-token: jwt-token
ocp-apim-subscription-key: <subscription-key>

Obtaining Your Subscription Key

To obtain your Ocp-Apim-Subscription-Key, please contact your Ctrack account manager or the Ctrack support team. Refer to the Support section for more information.