--- title: "API authentication types" description: "Learn how you can authenticate API requests that you make to Adyen." url: "https://docs.adyen.com/development-resources/api-authentication" source_url: "https://docs.adyen.com/development-resources/api-authentication.md" canonical: "https://docs.adyen.com/development-resources/api-authentication" last_modified: "2021-11-22T14:41:00+01:00" language: "en" --- # API authentication types Learn how you can authenticate API requests that you make to Adyen. [View source](/development-resources/api-authentication.md) Each API request that you make to Adyen must be authenticated. You can use either of the following authentication types: * [API key authentication](#api-key-authentication) * [Basic authentication](#using-basic-authentication) If you are using Adyen's [API libraries](/development-resources/libraries), you only need to generate and provide the credentials for the authentication type that you'll use. The libraries handle authenticating with Adyen. However, if you are making direct calls to Adyen APIs, then you must handle the authentication as described below. ## API key authentication Authenticate your request by sending an API key in an `x-API-key` HTTP request header. **API key in the request header** ```http POST /v68/paymentMethods HTTP/1.1 Host: checkout-test.adyen.com Content-Type: application/json x-API-key: ADYEN_API_KEY ``` You can [generate an API key](/development-resources/api-credentials#generate-api-key) from your Customer Area. ## Basic authentication Authenticate your request by sending a username and password in an `Authorization` HTTP request header. ```http Authorization: Basic YOUR_CREDENTIALS ``` In the header,`YOUR_CREDENTIALS` is the base64 encoded combination of the basic authentication username and password separated by a colon. For example, `ws_12345@Company.YourCompany:YOUR_BASIC_AUTH_PASSWORD`. **Basic authentication in the request header** ```http POST /v68/paymentMethods HTTP/1.1 Host: checkout-test.adyen.com Content-Type: application/json Authorization: Basic d3NfMTIzNDVAQ29tcGFueS5Zb3VyQ29tcGFueTpZT1VSX0JBU0lDX0FVVEhfUEFTU1dPUkQK ``` You can [generate a basic authentication username and password](/development-resources/api-credentials#basic-authentication) from your Customer Area. ## Next steps [Generate your API credentials](/development-resources/api-credentials) [Get your API credentials from your Customer Area.](/development-resources/api-credentials)