# API User Authentication Equinix APIs use OAuth 2.0 protocol to authenticate the requests you make to API endpoints. In order to interact with Equinix APIs, you need a bearer access token. Bearer determines the type of authentication scheme and is a part of the OAuth 2.0 protocol. ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") Interacting with Equinix products over API requires: * An Equinix Customer Portal account. * Product-specific create, modify, and delete permissions. Contact your organization's primary administrator and request access permissions. ## Generate Client ID and Client Secret[​](#generate-client-id-and-client-secret "Direct link to Generate Client ID and Client Secret") A Client ID and a Client Secret are necessary to obtain tokens that authorize your API requests. To generate a Client ID and Client Secret, register your app in the *Developer Settings* section of the Customer Portal. To register an app: 1. Sign in to the [Customer Portal](https://portal.equinix.com). 2. From the global navigation menu, select *Developer Settings* > *Apps* to display app details. ![](https://docs.equinix.com/assets/images/auth-dev-menu-a9161ccf9e632050f83ddb969f6d16f2.png) 3. API License Agreement - Before using the platform and APIs for the first time, you must read and accept the displayed API license agreement. ![](https://docs.equinix.com/assets/images/auth-license-agreement-b3b3306c8dbdc8fa214d34ce7f9874ce.png) Once you have accepted the agreement, you can find it in the *Additional Information* section. ![](https://docs.equinix.com/assets/images/auth-additional-info-86c6708fc3c7eb40798e8efd48715ce2.png) 4. Click **Create New App**. ![](https://docs.equinix.com/assets/images/auth-create_new_app-353d89258181768204be10e122cb9c51.png) 5. Provide an *app name*, select *app environment type* (Production), and click **Create**. ![](https://docs.equinix.com/assets/images/auth-create_new_app_details-c3850c198a7b8fa6bcba9a3debfaf5c1.png) 6. Click your app tile to open its details. 7. Click the eye icon to view your *Consumer Key* and *Consumer Secret*. ![](https://docs.equinix.com/assets/images/auth-app-details-pane-cd47a19c79e99ab157f7b4cd7addbf48.png) ## Requesting an Access Token[​](#requesting-an-access-token "Direct link to Requesting an Access Token") An access token is required to authorize your API requests. To request a token, send a `POST` request to the [`/oauth2/v1/token`](https://docs.equinix.com/api-catalog/accesstokenv1/oauth2-token/getoauth2accesstoken.md) endpoint, specifying your Client ID and Client Secret in the body of the request. Sample cURL request: ``` curl -X POST 'https://api.equinix.com/oauth2/v1/token' -H 'content-type: application/json' -d '{ "grant_type": "client_credentials", "client_id": "", "client_secret": "" }' ``` For a complete list of available parameters and options, see the [API Reference](https://docs.equinix.com/api-catalog/accesstokenv1/oauth2-token/getoauth2accesstoken.md). Sample response: ``` { "access_token": "", "token_timeout": "3600", "user_name": "john.doe@example.com", "token_type": "Bearer" } ``` ## Refreshing a Token[​](#refreshing-a-token "Direct link to Refreshing a Token") You can refresh your access token by sending a `POST` request to the [`/oauth2/v1/refreshaccesstoken`](https://docs.equinix.com/api-catalog/accesstokenv1/oauth2-token/refreshoauth2accesstoken.md) endpoint. Sample curl request: ``` curl -X POST 'https://api.equinix.com/oauth2/v1/refreshaccesstoken' -H 'content-type: application/json' -d '{ "client_id": "", "client_secret": "", "refresh_token": " }'‌‌ ``` For a complete list of available parameters and options, see the [API Reference](https://docs.equinix.com/api-catalog/accesstokenv1/oauth2-token/refreshoauth2accesstoken.md) ## Using Access Tokens[​](#using-access-tokens "Direct link to Using Access Tokens") To interact with Equinix API, send your access token in the Authorization header of the HTTP request with `authorization: Bearer ` Sample cURL request - an inbound shipment from the colocation API: ``` curl -X POST "https://api.equinix.com/colocations/v2/orders/shipments" -H "content-type: application/json" -H "authorization: Bearer " -d '{ "type": "INBOUND", "requestedDateTime": "2020-11-02T10:45:41Z", "cageId": "AM1:01:000111", "details": { "carrier": "CUSTOMER_CARRIER", "numberOfBoxes": 2 } }'‌ ```