Wordpress API error in Postman

Hello! I get an error in Postman (web client) when I try to send a HTTP GET request to my localwp site domain (that uses SSL).

In my browser (Chrome), this works perfectly fine:
https://[myurl].local/wp-json/wp/v2/posts

… but when I send a GET request in Postman to the same URL, I get the following error:
“Cloud Agent Error: Couldn’t resolve host. Make sure the domain is publicly accessible or select a different agent.”

That being said, it works in their desktop client, but I need it to work in the web client as well. Does anyone know how to approach this?

Thanks in advance!

Hi there @gptwriter - welcome to the Local community! :wave:

It sounds like you may want to use the Local Live Links feature, more information about that can be found here: Live Links - Local

Here’s an example of the Live Link + Postman setup:


Please let me know if this helps!

Sam

Hello Sam and thanks for your reply!

For some reason, I get the following error message:

{
    "code": "invalid_username",
    "message": "<strong>Error:</strong> Unknown username. Check again or try your email address.",
    "data": {
        "status": 401
    }
}

Looking at my screenshot below, my request looks identical to yours. What am I missing here? :thinking:

Hi there @gptwriter -

I agree, I see no differences in the setup.

Have you tried turning the live link off then back on, starting / stopping the site, closing / reopening Local, then sending the request?

What shows up under Headers (12) for you?

Sam

Thanks again for your help and sorry for the delay in my response! I’ve tried turning everything on and off and closing/reopening the live link, but the issue persists. Here are my headers in Postman (Desktop):

Hi @gptwriter -

Are you able to access via Postman with a completely fresh, default install of a new Local site?

Sam

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.