• I make the following call in Postman:
    {{baseUrl}}/?rest_route=/wp/v2/block-renderer/postman-generated-block

    I get the following response:
    {
    “code”: “rest_no_route”,
    “message”: “No route was found matching the URL and request method.”,
    “data”: {
    “status”: 404
    }
    }

    I can confirm that I’m running WP 6.6.2 and I am following the documentation here:

    https://developer.www.ads-software.com/rest-api/reference/rendered-blocks/

    TIA for your help.

Viewing 1 replies (of 1 total)
  • Hello @sgt621,

    The issue you’re experiencing with the error message rest_no_route when trying to call the REST API using the {{baseUrl}}/?rest_route=/wp/v2/block-renderer/postman-generated-block is likely happening because the route postman-generated-block it trying to to find the postman-generated-block block in WordPress default blocks but such block does not exist in the WordPress.

    You can try accessing blocks like archives, search which should work.
    {{baseUrl}}/?rest_route=/wp/v2/block-renderer/core/archives&context=edit

    Also add authentication the request may require authentication.

    Here’s how to add it in Postman:

    • In Postman, go to the Authorization tab.
    • Select Basic Auth.
    • You will need a username and an application password.

    To generate an application password in WordPress, follow these steps:

    1. Navigate to Users > Profile in the WordPress admin dashboard.
    2. Scroll down to Application Passwords.
    3. Give it a name and click Add New Application Password.
    4. Copy the generated password and use it in Postman.

    You can follow this tutorial: https://dev.to/david_woolf/using-postman-with-the-wordpress-rest-api-41bk#basic-authentication-with-application-passwords

    Hope this helps!

    • This reply was modified 1 week, 2 days ago by Aditya Dhade.
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.