• Resolved joshlozad4

    (@joshlozad4)


    Hi miniOrange team!
    I have an issue with the plugin. When I try the SSO login with the client I provided, I keep on getting this error:

    [body] => {"code":"rest_no_route","message":"No route was found matching the URL and request method","data":{"status":404}}
    [http_code] => 404
    [last_url] => https://philecdev054.cafe24.com/wp-json/moserver/resource

    I checked the route list of my site, and I see that the resource endpoint is registered there. Also, I’m just wondering why the authorize and token endpoint have no issues while this one has. Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author miniOrange

    (@cyberlord92)

    Hello there,

    Thanks for reaching out to us.

    We tried to visit the URL mentioned in your query and it was accessible to us.
    We did not encounter a 404 error.

    Can you confirm if this is already solved?
    If not, could you please let us know the steps to reproduce this issue?

    It would also be great to know more about how your client is calling that URL.

    Thanks,
    Team miniOrange

    Thread Starter joshlozad4

    (@joshlozad4)

    Thank you for your response.
    Unfortunately, the issue is still persistent.
    I’ll provide the full details here.

    The client that is calling this URL is this site: https://samqd.cafe24shop.com/member/login.html
    If you try to click the first SSO button, it should open the authorization endpoint, https://philecdev054.cafe24.com/wp-json/moserver/authorize. You can use this login creds for this: lee / wpectest01
    After giving the site access, nothing is happening.
    Here is the API log

    == USER INFO API CALL ==

    
    Array
    (
        [aParam] => Array
            (
                [url] => https://philecdev054.cafe24.com/wp-json/moserver/resource
                [method] => POST
                [post_fields] => access_token=8299ec3b6fbc3b24a7aa4fe711d37b64
            )
    )
    

    == USER INFO API RETURN ==

    
    Array
    (
        [aResult] => Array
            (
                [header] => HTTP/1.1 404 Not Found
    Server: nginx
    Date: Fri, 19 Jun 2020 07:31:26 GMT
    Content-Type: application/json; charset=UTF-8
    Content-Length: 113
    Connection: keep-alive
    X-Powered-By: PHP/7.3.1p1
    X-Robots-Tag: noindex
    Link: ; rel="https://api.w.org/"
    X-Content-Type-Options: nosniff
    Access-Control-Expose-Headers: X-WP-Total, X-WP-TotalPages
    Access-Control-Allow-Headers: Authorization, Content-Type
                [body] => {"code":"rest_no_route","message":"No route was found matching the URL and request method","data":{"status":404}}
                [http_code] => 404
                [last_url] => https://philecdev054.cafe24.com/wp-json/moserver/resource
            )
    )
    
    • This reply was modified 4 years, 9 months ago by joshlozad4.
    Plugin Author miniOrange

    (@cyberlord92)

    Hi,

    Thanks for the detailed explanation.

    It looks like you are sending a POST request to the “userinfo” endpoint.
    This endpoint is meant to be used with a GET request instead of POST.

    Could you call this endpoint with a GET request and let us know if you still face this issue?

    As for the error code, WordPress sends a 404 response if the request method is not registered/allowed.

    Thanks,
    Team miniOrange

    Thread Starter joshlozad4

    (@joshlozad4)

    Hi,
    Thank you for the response.
    I’ll check with the SSO client developers if they can do some code modification so that a GET request can be possible.
    I’ll resolve this topic once we’ve confirmed it.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘rest_no_route error on resource endpoint’ is closed to new replies.