Skip to content

HandyPlugins

  • Home
  • PluginsExpand
    • Magic Login Pro
    • Handywriter
    • WP Accessibility Toolkit
    • PaddlePress Pro
    • Easy Text-to-Speech
  • Docs
  • About
  • Blog
  • Contact
My Account
HandyPlugins
Popular Search shortcodethehookemailredirect

Magic Login Pro

36
  • Installation & Configuration
  • Use magic login as the default login method?
  • Brute Force Protection
  • WooCommerce Integration
  • Easy Digital Downloads (EDD) Integration
  • Token Lifespan
  • Disable Magic Login for a Specific User
  • Login with Code: Flexible Passcode-Based Authentication
  • SMS Login – Passwordless Authentication with SMS
  • Magic Login REST API
  • QR Code Login
  • CLI Command
  • Add Login form to a Page
  • Reset Tokens
  • Auto Login Links
  • Token Validity
  • Login Redirect
  • Shortcode
  • Login Email Customization
  • Login Request Throttling
  • IP Check
  • Domain Restriction
  • Registration
  • Spam Protection
  • How to Add Magic Login to Any of Outgoing Emails?
  • Customize Default Messages
  • nG Firewall
  • Dynamically Adjust Token TTL
  • How to change Sender Details?
  • Disable Magic Login for specific roles
  • Customizing Login Session Duration
  • Magic Login Twilio Integration
  • Magic Login – FluentCRM Integration
  • Reset Magic Login Links for a User
  • Hooks
  • Tools – Reset, Export & Import Magic Login Settings

PaddlePress Pro

26
  • Installation & Configuration
  • How does PaddlePress PRO work?
  • Automatic account creation
  • How to set up a membership website?
  • Setup a Development Environment
  • Protect Download Files on NGINX
  • Software Licensing
  • Software Licensing API
  • Updater Implementation for WordPress Plugins
  • Updater Implementation for WordPress Themes
  • Release a New WordPress Product
  • Customer Dashboard (My Account) Page
  • Checkout Buttons
  • Custom Redirect After Successful Checkout
  • How does the domain count?
  • Emails
  • Accessing Readme through a Shortcode
  • How to Sell WordPress Products?
  • Releasing Beta Versions of a WordPress Product
  • Paddle Billing
  • Customer Dashboard
  • Membership Levels
  • Restrict Content
  • Add a Custom Payment Action
  • How to customize “Download” Button?
  • Adding Manual Payments

Handywriter

11
  • Installation & Configuration
  • Write a Blog Post
  • Create a Summary
  • Suggest a Title
  • Keep records of AI generated Contents
  • Grammar & Spelling Fixer
  • Plagiarism Check
  • Content Templates
  • How to create a Meta Description?
  • How to complete a sentence?
  • How does credit calculation work?

Easy Text-to-Speech

5
  • Installation & Configuration
  • Using with Block Editor
  • Using with Classic Editor
  • OpenAI Integration
  • ElevenLabs Integration

WP Accessibility Toolkit

3
  • Customization
  • Hotkeys: Quick Navigation and Efficiency
  • Do not show the accessibility toolkit on the specific page

FAQ

1
  • How to Enter Your VAT Number for VAT Deduction at Checkout
  • Home
  • Docs
  • Magic Login Pro
  • Magic Login REST API
View Categories

Magic Login REST API

Magic Login Pro provides a REST API that allows programmatic generation of login links and optional delivery via email. It is ideal for custom front-end workflows, mobile app integration, and automation scenarios.

Enable API Access #

To use the REST API, enable it from the WordPress admin panel:

  • Go to Settings → Magic Login PRO → Login (tab).
  • Toggle Enable REST API.

Once enabled, the plugin will register the REST endpoint.

Authentication #

You will need to use “Basic Auth” as the authorization method, which you can easily set up by creating an application token within your WordPress.

Only users with the edit_user capability can request login links on behalf of others. For example:

  • Administrators can generate login links for any user.
  • Subscribers can only generate links for themselves.

Endpoint Details #

  • URL: https://yourdomain.com/wp-json/magic-login/v1/token
  • Method: POST

Required Headers #

Authorization: Basic base64(user:application-password)
Content-Type: application/json

Request Parameters #

ParameterTypeRequiredDescription
userstringYesUser ID, username, email, or phone number.
sendbooleanNoIf true, sends the login link via email or SMS (if SMS is enabled).
redirect_tostringNoOptional URL to redirect to after login.
qrbooleanNoIf true, includes a QR code URL in the response.
qr_imgbooleanNoIf true, includes an HTML <img> tag with the QR code in the response.

Example Request

curl -X POST https://yourdomain.com/wp-json/magic-login/v1/token \
-H "Authorization: Basic <base64-credentials>" \
-H "Content-Type: application/json" \
-d '{
  "user": "[email protected]",
  "send": true,
  "redirect_to": "https://yourdomain.com/dashboard",
  "qr": true,
  "qr_img": true
}'

Response:

{
  "link": "https://yourdomain.com/wp-login.php?user_id=12&token=...",
  "mail_sent": true,
  "qr": "https://yourdomain.com/magic-login-qr?url=...",
  "qr_img": "<img src=\"https://yourdomain.com/magic-login-qr?url=...\" width=\"150\" alt=\"Scan to login\">"
}

Error Response #

If no user is found:

{
  "code": "missing_user",
  "message": "No account matches the given user."
}


HTTP Status Code: 422

Notes

  • Phone number login is supported if SMS login is enabled.
  • The user field accepts user ID, username, email, or E.164-formatted phone numbers (e.g., +1234567890).
  • Use qr and qr_img to simplify front-end QR code integrations.
  • The QR code URLs returned are compatible with any browser or email client.

This REST API is perfect for building custom login interfaces while retaining the security and simplicity of Magic Login.

Was this guide helpful for you?
Updated on May 10, 2025
SMS Login – Passwordless Authentication with SMSQR Code Login
Table of Contents
  • Enable API Access
  • Authentication
  • Endpoint Details
    • Required Headers
    • Request Parameters
    • Error Response

HandyPlugins

Explore

Home
Blog
Contact Us
My Account

Products

Magic Login Pro
Handywriter
Easy Text-to-Speech
PaddlePress Pro
WP Accessibility Toolkit

Follow Us

Twitter
Facebook
GitHub
WordPress

2025 – HandyPlugins.co | Hosted on WPHandle and optimized with Powered Cache

  • Terms and Conditions
  • Privacy Policy
  • Cookie Policy
  • Home
  • Plugins
    • Magic Login Pro
    • Handywriter
    • WP Accessibility Toolkit
    • PaddlePress Pro
    • Easy Text-to-Speech
  • Docs
  • About
  • Blog
  • Contact
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkPrivacy policy