# Making Automation Hub API Calls

> * Define the token as a **bearer -H 'Authorization: Bearer [Tenant ID]/ [Token_generted_from_the_Open API_page]**.
* If an **App Key** was defined when generating the token, it's mandatory that you apply it using the following key: **x-ah-openapi-app-key: [defined app key]**
* Adding **x-ah-openapi-auth: openapi-token** key in the header is mandatory as it indicates the token type.

* Define the token as a **bearer -H 'Authorization: Bearer [Tenant ID]/ [Token_generted_from_the_Open API_page]**.
* If an **App Key** was defined when generating the token, it's mandatory that you apply it using the following key: **x-ah-openapi-app-key: [defined app key]**
* Adding **x-ah-openapi-auth: openapi-token** key in the header is mandatory as it indicates the token type.

:::note
The API base URL format varies by deployment environment. For the correct base URL for your environment, see [Introduction to the Automation Hub API](introduction-to-automation-hub-api-1.md).
:::

The easiest way to build the Automation URL is by using the **process_slug**.

For example, if the process_slug is: **`process_slug": "onboarding-of-new-employee"`**

Then the URL for that automation is: **`https://automation-hub.uipath.com/{tenantName}/process_slug/onboarding-of-new-employee`**

The request should look as in the following example:

```
Content-Type: application/json 
Authorization: Bearer [Tenant ID/Token] 
x-ah-openapi-app-key: [API key if added] 
x-ah-openapi-auth: openapi-token
```

* Use the **Copy to Clipboard** option available after the **Token** column to copy-paste your **[Tenant ID\Token]** value from your Automation Hub **Open API** page as described in the [Generate your Token](https://docs.uipath.com/automation-hub/automation-cloud/latest/api-guide/generate-your-token-from-automation-hub) page.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/automation-hub/ah-docs-image-215259-002f5b59-09637a0f.webp)

* If an **App Key** is included for your token, a **Copy to Clipboard** option becomes available after the App Key column. Use it to copy-paste your **[App Key]** value.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/automation-hub/ah-docs-image-215263-bd1e9a04-4c3977f3.webp)

:::note
The **[Token]** required for making Automation Hub API calls has limited validity. In case this expired, edit the expiration date by accessing the Actions > Edit option from the Action column corresponding to the token OR generate a new token as mentioned in the [Generate your Token](https://docs.uipath.com/automation-hub/automation-cloud/latest/api-guide/generate-your-token-from-automation-hub) page. Otherwise, you will receive a 401 status code.
:::
