---
title: Quick Start
description: Learn how to authenticate and make your first request with WP Engine's Hosting Platform API.
url: https://developers.wpengine.com/docs/managed-hosting-platform/api/quick-start/
image: https://developers.wpengine.com/og/docs/managed-hosting-platform/api/quick-start.png
---

# Quick Start

This guide walks you through authenticating and making your first request to WP Engine’s Hosting Platform API.

## Prerequisites

Before you begin, you’ll need:

- An understanding of [what the Hosting Platform API is](https://developers.wpengine.com/docs/managed-hosting-platform/api/)
- A [WP Engine](https://wpengine.com/) account with [API access enabled](https://wpengine.com/support/enabling-wp-engine-api/#Enable_WPE_API).
- API credentials (API User ID and API Password) generated in the WP Engine User Portal on the [API Access page](https://my.wpengine.com/api_access).
- A tool to make HTTP requests, such as **cURL**, **Postman**, or your preferred programming language.

> **Note**
>
> All users can see the status of their accounts via the [API Access page](https://my.wpengine.com/api_access) in the WP Engine User Portal, but only account owners have the ability to enable/disable API access.

## Authentication

WP Engine’s Hosting Platform API uses **Basic Auth**. Credentials are sent as a base64-encoded `WPE_API_USER_ID:WPE_API_PASSWORD` string in the `Authorization` header.

> **Caution**
>
> API credentials are not the same as your Username and Password for [https://my.wpengine.com](https://my.wpengine.com/). Make sure to use the correct API User ID and API Password from the [API Access page](https://my.wpengine.com/api_access).

Example cURL request:

cURL Example

```bash
curl -X GET "https://api.wpengineapi.com/v1/installs?limit=5" \
  -u "$WPE_API_USER_ID:$WPE_API_PASSWORD"
```

If successful, the response will look something like this:

JSON

```json
{
  "count": 1,
  "results": [
    {
      "id": 12345,
      "name": "my-wp-site",
      "account_id": 67890,
      "created_at": "2024-01-01T12:00:00Z"
    }
  ]
}
```

## Environment Variables (Recommended)

Your API credentials are sensitive. For security, store your credentials in environment variables:

Set Environment Variables

```bash
export WPE_API_USER_ID="YOUR_API_USER_ID"
export WPE_API_PASSWORD="YOUR_API_PASSWORD"
```

Now you can reference them in code without hardcoding secrets.

## Example Requests

Here are simple examples in different languages to fetch your installs.

- [Go](https://developers.wpengine.com/docs/managed-hosting-platform/api/quick-start/#tab-panel-0-0)
- [JavaScript](https://developers.wpengine.com/docs/managed-hosting-platform/api/quick-start/#tab-panel-0-1)
- [PHP](https://developers.wpengine.com/docs/managed-hosting-platform/api/quick-start/#tab-panel-0-2)
- [Python](https://developers.wpengine.com/docs/managed-hosting-platform/api/quick-start/#tab-panel-0-3)

```go
package main


import (
  "fmt"
  "io"
  "net/http"
  "os"
)


func main() {
  user := os.Getenv("WPE_API_USER_ID")
  pass := os.Getenv("WPE_API_PASSWORD")
  url := "https://api.wpengineapi.com/v1/installs?limit=5"
  req, _ := http.NewRequest("GET", url, nil)
  req.SetBasicAuth(user, pass)
  resp, err := http.DefaultClient.Do(req)
  if err != nil { panic(err) }
  defer resp.Body.Close()
  body, _ := io.ReadAll(resp.Body)
  fmt.Println(string(body))
}
```

## Next Steps

You’ve successfully made your first request! From here, you can:

- Explore the [API Reference](https://developers.wpengine.com/docs/managed-hosting-platform/api/reference/) for available endpoints.
- Follow the [Tutorial](https://developers.wpengine.com/docs/managed-hosting-platform/api/tutorial) for a deeper walkthrough, including pagination, error handling, and automation.

## 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"}}]}
```
