• Plans & Pricing
  • Log in
  • Get started
  • WordPress Hosting
  • WordPress for Agencies
  • Become an Affiliate
  • Domain Names
  • AI Website Builder
  • Website Builder
  • Create a Blog
  • Newsletter
  • Professional Email
  • Website Design Services
  • Commerce
  • WordPress Studio
  • Enterprise WordPress 
  • Overview
  • WordPress Themes
  • WordPress Plugins
  • WordPress Patterns
  • Google Apps
  • Support Center
  • WordPress News
  • Business Name Generator
  • Logo Maker
  • Discover New Posts
  • Popular Tags
  • Blog Search
Get started
  • Sign up
  • Log in
About
  • Plans & Pricing
Products
  • WordPress Hosting
  • WordPress for Agencies
  • Become an Affiliate
  • Domain Names
  • AI Website Builder
  • Website Builder
  • Create a Blog
  • Newsletter
  • Professional Email
  • Website Design Services
  • Commerce
  • WordPress Studio
  • Enterprise WordPress  
Features
  • Overview
  • WordPress Themes
  • WordPress Plugins
  • WordPress Patterns
  • Google Apps
Resources
  • Support Center
  • WordPress News
  • Business Name Generator
  • Logo Maker
  • Discover New Posts
  • Popular Tags
  • Blog Search
Jetpack App
  • Learn more
  • Support Center
  • Guides
  • Courses
  • Forums
  • Contact
Search
  • Support Center
  • Guides
  • Courses
  • Forums
  • Contact
Forums / How to send a POST request to the WordPress REST API?

How to send a POST request to the WordPress REST API?

  • Unknown's avatar
    xanadu6 · Member · Dec 20, 2023 at 5:48 pm
    • Copy link Copy link
    • Add topic to favorites Add topic to favorites

    I want to make posts to my blog by using the WordPress API.

    In order to authenticate my requests, I understand that I have to create a username and password for a private app.

    This video tries to explain how to create an application password.

    The problem is, the UI has changed since that video was made. After opening the Users tab, no option appears to create an application.

    So, how can I create a new app to give it a username and password so I can authenticate my API calls?

  • Unknown's avatar
    umair4342fa0bcb · Member · Dec 20, 2023 at 6:00 pm
    • Copy link Copy link

    there are actually a few different authentication methods available, each with its own advantages and security considerations. Here’s a breakdown of the options:
    Method: Using username and password embedded in the Authorization header.
    Advantages: Simple to implement, compatible with many libraries and tools.
    Disadvantages: Less secure, passwords are exposed during transmission, not suitable for long-lived applications

    OAuth 1.0a:

    Method: Industry-standard OAuth protocol with tokens and authorization codes.
    Advantages: More secure than basic authentication, tokens can be refreshed, suitable for long-lived applications.
    Disadvantages: More complex to implement, requires additional steps in the authorization flow
    OAuth 2.0:

    Method: Newer version of OAuth with improved security and flexibility.
    Advantages: Most secure option, supports different grant types like client credentials and password, suitable for various use cases.
    Disadvantages: Requires careful configuration and management of tokens, can be complex for beginners.
    Basic authentication: If you’re working with a simple script or need a quick solution, basic authentication might be sufficient. However, avoid this method for sensitive data or long-lived applications.
    OAuth 1.0a: Consider this option if you need more security than basic authentication but want to avoid the complexity of OAuth 2.0.
    OAuth 2.0: Choose this method for best security practices and maximum flexibility, especially for long-lived applications or those interacting with sensitive data.

    1. Using the “API Keys” Feature:
      Using the JWT Authentication for WP-API Plugin:

    If you’re looking for a more robust and flexible token-based authentication system, consider using the “JWT Authentication for WP-API” plugin.
    This plugin allows you to create various types of tokens with different permissions and expiration times.
    After installing and activating the plugin, follow the provided instructions to create your desired JWT token for API access.

    1. Using the WordPress.com REST API:

    If you’re using WordPress.com, they offer their own OAuth API authentication system.
    Go to the “My Sites” page on WordPress.com.
    Click on the site you want to manage and navigate to “Tools > Jetpack”.
    Click on the “Connect” button to enable Jetpack for your site.
    Once Jetpack is enabled, go to “Settings > Jetpack” and then to the “Connections” tab.
    Click on the “Add New” button and select “API”.
    Give your API a name and click “Create API Key”.
    Your API key and secret will be displayed. Use them for authentication with the WordPress.com REST API

  • Unknown's avatar
    xanadu6 · Member · Dec 20, 2023 at 6:19 pm
    • Copy link Copy link

    @umair4342fa0bcb Thank you for your reply.

    The menus don’t match what you are describing for the Jetpack option.

    Could you please provide a screenshot of what I should be seeing?

  • Unknown's avatar
    xanadu6 · Member · Dec 20, 2023 at 8:10 pm
    • Copy link Copy link

    @umair4342fa0bcb Is this possible on a free account?

  • Unknown's avatar
    umair4342fa0bcb · Member · Dec 20, 2023 at 8:39 pm
    • Copy link Copy link

    However, there are still options for interacting with your WordPress site on a free account:

    • Jetpack Plugin: The free Jetpack plugin unlocks some limited APIs for features like contact forms and social sharing. You can explore its offerings to see if any meet your needs.
    • External Plugins: Some specialized plugins might offer their own APIs even for free accounts. However, their capabilities and functionalities will vary greatly.
    • Alternative Methods: Consider alternative methods for posting content besides the WordPress API, like directly editing theme files (not recommended for beginners) or using third-party tools that integrate with WordPress without requiring API access.

    Remember, free accounts on WordPress.com are primarily for creating and hosting basic websites. They offer limited flexibility compared to paid plans. If you need full API access for advanced functionality, upgrading to a paid plan might be necessary.

    I hope this clarifies the limitations of free accounts and provides alternative options for your needs. Feel free to ask if you have any further questions or need help exploring specific tools or plugins.

  • Unknown's avatar
    xanadu6 · Member · Dec 20, 2023 at 10:21 pm
    • Copy link Copy link

    @umair4342fa0bcb I’m sorry. I didn’t understand the clear answer to my question. I apologize. Let me rephrase for clarity…

    Is it possible to access the WordPress API with a free account?

  • The topic ‘How to send a POST request to the WordPress REST API?’ is closed to new replies.

Tags

  • account
  • design

About this topic

  • In: Support
  • 2 participants
  • 5 replies
  • Last activity 2 years
  • Latest reply from xanadu6

Couldn't find what you needed?

Contact us

Contact us

Get answers from our AI assistant, with access to 24/7 expert human support on paid plans.

Browse our guides

Browse our guides

Find step-by-step solutions to common questions in our comprehensive guides.

WordPress.com

Products
  • WordPress Hosting
  • WordPress for Agencies
  • Become an Affiliate
  • Domain Names
  • AI Website Builder
  • Website Builder
  • Create a Blog
  • Professional Email
  • Website Design Services
  • WordPress Studio
  • Enterprise WordPress
Features
  • Overview
  • WordPress Themes
  • WordPress Plugins
  • WordPress Patterns
  • Google Apps
Resources
  • WordPress.com Blog
  • Business Name Generator
  • Logo Maker
  • WordPress.com Reader
  • Accessibility
  • Remove Subscriptions
Help
  • Support Center
  • Guides
  • Courses
  • Forums
  • Contact
  • Developer Resources
Company
  • About
  • Press
  • Terms of Service
  • Privacy Policy
  • Do Not Sell or Share My Personal Information
  • Privacy Notice for California Users
DeutschEspañolFrançaisBahasa IndonesiaItalianoNederlandsPortuguês do BrasilSvenskaTürkçeРусскийالعربيةעִבְרִית日本語한국어简体中文繁體中文English

Mobile Apps

  • Download on the App Store
  • Get it on Google Play

Social Media

  • WordPress.com on Facebook
  • WordPress.com on X (Twitter)
  • WordPress.com on Instagram
  • WordPress.com on YouTube

Automattic

Automattic
Work With Us
    • WordPress.com Forums
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • Manage subscriptions