# Aware APIs
Source: [https://docs.qualcomm.com/doc/80-70215-1/topic/aware-apis.html](https://docs.qualcomm.com/doc/80-70215-1/topic/aware-apis.html)
Qualcomm Aware APIs are documented in the OpenAPI specification and available for access
in the portal at [https://docs.demo.aware.qualcomm.com/](https://docs.demo.aware.qualcomm.com/).
All Qualcomm Aware APIs are secured and can only be accessed after a successful
authentication. To get authenticated, an access token must be generated to consume the
Aware APIs. An access token can be generated using the OAuth Client credential flow with
an Aware issued Client ID and Client Secret. The Client ID and Client Secret should only
be used to authenticate an application when creating the API Bearer Tokens.
Note that the Client ID is the public identifier of an application, whereas the Client
Secret is private and confidential. Use caution when storing the Client Secret and
Bearer Tokens, as they will grant privileged access to Aware APIs for your tenant.
## Get Client ID and Client Secret
To generate client credentials for your tenant, create an Aware [MySupport](https://mysupport.qualcomm.com/aware/s/) request. The support team can provide the Client ID and Client
Secret that you can use to generate access tokens to place the Aware API
requests.
## Generate access token
Once the Client ID and Client Secret are obtained, make a HTTPS POST request to the
`authentication` endpoint\* by passing the basic authorization in
the header with the Client ID and Client Secret. Note that the generated access
token expires after some time. Expiry duration can be found in the response. When
the token expires, repeat the API call to get the renewed access token.
## HTTP request
- **Method:** POST
- **URL:**
[https://apigwx-aws.qualcomm.com/aware-demo/v1/accesstoken?grant_type=client_credentials](https://apigwx-aws.qualcomm.com/aware-demo/v1/accesstoken?grant_type=client_credentials)\*
- **Header:** Authorization: "Basic "+base64(client\_id:client\_secret)
## HTTP response
{
"access_token": "RNgRLgg0hDAZrOwJtO96eEQrY8xU", // ACCESS_TOKEN
"expires_in": "3599", // Token valid time in seconds
"token_type": "BearerToken" // Type of the token
}Copy to clipboard
An example request is shown
below:
curl --location --request POST 'https://apigwx-aws.qualcomm.com/aware-demo/v1/accesstoken?grant_type=client_credentials' \
--header 'Authorization: Basic WXE2ZmpNUjhzdDQ0RGw1ZFpteFlXYkswMzEzRUFVQUdtY2g1eT1I4ZnVzZEQ5NjAwb1Q0MVJthlKMQzhWR0U='Copy to clipboard
Use the obtained access token in subsequent Aware API calls:
## Consume Aware APIs
To consume Aware APIs, pass the generated **access\_token** in the header of the
subsequent HTTP requests along with other mandatory header fields.
Table : Consume Aware APIs
| Name | Description | Example | Required? |
| --- | --- | --- | --- |
| X-QCOM-TracingID | Unique uuid passed along with the request to track the API
calls. | a4a68730-2494-11ed-861d-0242ac120002 | Yes |
| X-QCOM-AppName | Name of the app calling the API. | Client Location App, Aware, etc. | Yes |
| X-QCOM-ClientType | Type of client making the API call. | Any one of the following allowed values: