WP Autologin

Generate single-use autologin token for website admin access

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
get/v1/account/websites/{website_id}/single?admin_url={wp_admin_url}

Request

Path parameters

website_idinteger required

Query parameters

admin_urlstring required

URL of the WordPress admin panel

Headers

x-api-keystring required

API key for authentication

Response

Autologin token generated successfully

status'ok' | 'error'
tokenstring

Single-use token for website admin autologin

Example response

{
  "status": "ok",
  "token": "FFX0jjafItN3SNbAyEkQf6rJUvLcM6HiEVJotjGnaxgita3C7cJIWCvESBtSsfqXhJL7HyUP9B3xQXQHkrr6HhY3HfcHAgiiVskxUAjfiiQRoNXaOZ7jTnnNMS"
}

Changes

No recorded changes to this operation across all 1 revision of this API.