---
title: "Create API token for Dashboard"
method: GET
path: "/wp_dashboard_create_api_token"
tags: ["Authentication", "API Token Management"]
---

# Create API token for Dashboard

`GET /wp_dashboard_create_api_token`

This function creates a WHM API token for WebPros Dashboard.

## Query parameters

- `acl` string, required
- `token_name` string, required
- `expires_at` integer
- `whitelist_ip` union
  - string, ipv4
  - string, ipv6
  - string, cidr

## Response `200`

HTTP Request was successful.

- object
  - `data` object
    - `acls` string[] — An array of privileges that the token possesses.
    - `create_time` integer — The API token's creation time, in [Unix Epoch format](https://go.cpanel.net/unix_time).
    - `expires_at` integer, nullable — The API token's expiration time, in [Unix Epoch format](https://go.cpanel.net/unix_time).
    - `name` string — The new API token's name.
    - `token` string — The new API token to use to authenticate to WHM. **Note:** You **cannot** access the token again after you use this function. Save the token in a safe location.
    - `whitelist_ips` union[], nullable — The list of remote IP addresses or CIDR IP address ranges that can use this token.
      - union
        - string, ipv4
        - string, ipv6
        - string, cidr
  - `metadata` object
    - `command` string — The method name called.
    - `reason` string — The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds.
    - `result` 0 | 1 — * `1` — Success. * `0` — Failed. Check the `reason` field for more details.
    - `version` integer — The version of the API function.

---

[API](https://skmtc.net/cpanel/apis/whm-api.md) · [All operations](https://skmtc.net/cpanel/apis/whm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/whm-api/revisions/3da41671c02c/schema)
