---
title: API authentication
description: Headless Platform API Reference
url: https://developers.wpengine.com/docs/headless-platform/reference/api/authentication/
image: https://developers.wpengine.com/og/docs/headless-platform/reference/api/authentication.png
---

# API authentication

## Purpose

This document provides instructions on how to obtain authorization to use the Headless Platform API. Once authorized, you can send requests directly or via the [Endpoints documentation](https://developers.wpengine.com/docs/headless-platform/reference/api/endpoints/) section. This setup is designed to simplify testing of the Headless Platform API.

## Prerequisites

To enable this functionality, you first need to generate authentication credentials. You can do this by navigating to the WP Engine User Portal. From the left-hand menu, select `Users`, then the `API Access tab`, and finally `Generate Credentials`. The following screenshots will guide you through the process.

![Getting to API credentials in portal](https://developers.wpengine.com/_astro/api-access.CTqZi83p_Z6i73C.webp)

Next, click the `Generate credentials` button.

![Credentials modal screenshot from portal](https://developers.wpengine.com/_astro/api-credentials-modal.Cxbz7w8t_1HCBCg.webp)

> **Caution**
>
> Once you close the dialog window, you will not be able to access the password again. Copy it and store it securely.

## Using the Headless Platform API

With authentication credentials generated, you can start sending requests to the Headless Platform API. Below is an example of such a request:

Terminal window

```bash
curl -X GET -H "Content-Type: application/json" -u "PUT_API_USERNAME_HERE:PUT_API_PASSWORD_HERE" https://js.wpengineapi.com/v1/accounts/{PUT_ACCOUNT_NAME_HERE}/apps
```

Alternatively, if you wish to quickly test specific endpoints, you can do so through our documentation. Navigate to the `API > Endpoints Documentation` tab and click the `Authorize` button. A modal will appear where you should enter the credentials you generated.

After successful authorization, locate the query you are interested in, click the `Try it now` button, input the necessary parameters, and click `Execute`.

## Was this helpful?

Thanks for the feedback!

```json
{"@context":"https://schema.org","@graph":[{"@type":"WebSite","@id":"https://developers.wpengine.com/#website","name":"WP Engine Product Documentation","url":"https://developers.wpengine.com/","description":"Resources for developing, deploying, and scaling on WP Engine.","inLanguage":"en-US","keywords":["API documentation","product documentation","headless WordPress","managed WordPress hosting"],"publisher":{"@id":"https://wpengine.com/#organization"}},{"@type":"Organization","@id":"https://wpengine.com/#organization","name":"WP Engine","url":"https://wpengine.com/"},{"@type":"TechArticle","@id":"https://developers.wpengine.com/docs/headless-platform/reference/api/authentication/#article","mainEntityOfPage":{"@type":"WebPage","@id":"https://developers.wpengine.com/docs/headless-platform/reference/api/authentication/"},"headline":"API authentication","description":"Headless Platform API Reference","author":{"@id":"https://wpengine.com/#organization"},"publisher":{"@id":"https://wpengine.com/#organization"},"dateModified":"2026-04-16","inLanguage":"en-US","isPartOf":{"@id":"https://developers.wpengine.com/#website"}},{"@type":"BreadcrumbList","@id":"https://developers.wpengine.com/docs/headless-platform/reference/api/authentication/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"WP Engine Product Documentation","item":"https://developers.wpengine.com/"},{"@type":"ListItem","position":2,"name":"Headless","item":"https://developers.wpengine.com/docs/headless-platform/"},{"@type":"ListItem","position":3,"name":"API authentication","item":"https://developers.wpengine.com/docs/headless-platform/reference/api/authentication/"}]}]}
```
