---
title: "Generate single-use autologin token for website admin access"
method: GET
path: "/v1/account/websites/{website_id}/single?admin_url={wp_admin_url}"
tags: ["WP Autologin"]
---

# Generate single-use autologin token for website admin access

`GET /v1/account/websites/{website_id}/single?admin_url={wp_admin_url}`

## Request

- Base URL: `https://api.10web.io`
- URL: `https://api.10web.io/v1/account/websites/{website_id}/single?admin_url={wp_admin_url}`
- Auth: none declared. Required headers: `x-api-key`
- TypeScript: <https://skmtc.dev/10web/apis/10web-api-v1/docs/v1/account/websites/:website_id/single%3Fadmin_url=:wp_admin_url/get.ts> (a function with typed inputs; its response is checked against the schema)

Generates a single-use token for secure, passwordless access to a website's WordPress admin panel.
The token is valid for 5 minutes and can be used to automatically log in or create an admin user.

The autologin feature allows for secure, tokenized access to WordPress admin panels without requiring manual credential entry. The system generates single-use tokens with a 5-minute TTL that can be used to:

1. Log in automatically as an existing user if the email matches a WordPress user
2. Create a new administrator account with the provided email and automatically log in

### Token Usage

After obtaining a token, construct a URL in one of the following formats:

**Standard WordPress Admin Access:**
```
https://{website_url}/wp-admin/?twb_wp_login_token={token}&email={email}
```

**Direct Access to AI Builder Generation Page:**
```
https://{website_url}/wp-admin/?twb_wp_login_token={token}&email={email}&page=twbb_ai_builder&open_ai_generation=1
```

When a user visits either URL:
- If a user with the provided email exists in WordPress, they will be automatically logged in
- If no matching user exists, a new administrator account will be created with the email and automatic login occurs
- With the `&page=twbb_ai_builder&open_ai_generation=1` parameter, users will be redirected directly to the AI Builder generation page after login

### Security Notes

- Tokens can only be used once
- Tokens expire after 5 minutes
- This provides a secure method for resellers to give customers access to their WordPress admin panels

## Path parameters

- `website_id` integer, required

## Query parameters

- `admin_url` string, required

## Headers

- `x-api-key` string, required

## Response `200`

Autologin token generated successfully

- object
  - `status` 'ok' | 'error'
  - `token` string: Single-use token for website admin autologin

## Other responses

- `400`: Bad request
- `403`: Unauthorized access
- `429`: Too many requests
- `500`: Something went wrong

---

[API](https://skmtc.dev/10web/apis/10web-api-v1.md) - [All operations](https://skmtc.dev/10web/apis/10web-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/10web/apis/10web-api-v1/revisions/01afc9651dfc?raw)
