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 shortcodethehookredirectemail

Magic Login Pro

32
  • 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
  • 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

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

You can use Magic Login with REST API for programmatic access to login links or sending login emails directly to the users.

Enable API Access on the Settings Page #

Once you enable REST API, it will register the necessary endpoints.

Authorization #

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. The endpoint checks the “edit_user” capability. For example, an admin user can request a login link for any user, while a user with a subscriber role can only request their own login link.

Endpoint #

Example request with cURL:

curl -L 'https://plugindevel.test/wp-json/magic-login/v1/token' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YWRtaW46S080SyBxUG4yIFkzdHUgY2NwbSB5MzFkIEVZblY=' \
-d '{
    "user": "[email protected]",
    "send": true,
    "redirect_to": "https://plugindevel.test/my-account/"
}'

Response:

{
    "link": "https://plugindevel.test/wp-login.php?user_id=12&token=09544282e92ed3b31980336938e3dc1f61a28f7e&magic-login=1&redirect_to=https%3A%2F%2Fplugindevel.test%2Fmy-account%2F",
    "mail_sent": true
}

or error with 422 status code:

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


Endpoint: https://example.com/wp-json/magic-login/v1/token
Request method: POST

Supported Parameters

user: ID or username or email (Required)
send: boolean (Optional) If set to true, the login email will be sent.
redirect_to: string (Optional) Target URL for the redirection.

Was this guide helpful for you?
Updated on November 26, 2024
SMS Login – Passwordless Authentication with SMSCLI Command
Table of Contents
  • Enable API Access on the Settings Page
  • Authorization
  • Endpoint

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