• Resolved edsonsantoro

    (@edsonsantoro)


    Hi guys,

    While authenticating a user with /wc-auth/v1/authorize endpoint, the callback_url generated by WooCommerce is as follows:

    Encoded (as is) *changed real domain to my-domain
    callback_url=https%3A%2F%2F<my-domain>%2FWooDash%2Frest%2Fwoodash%2Fauth&scope=read_write&wc_auth_nonce=a67e42a34d

    Decoded (for understanding) *changed real domain to my-domain
    callback_url=https://<my-domain>/WooDash/rest/woodash/auth&scope=read_write&wc_auth_nonce=a67e42a34d

    The problem connecting WooCommerce with my platform is the parameters. URL should be formatted as : ?scope=read_write&wc_auth_nonce=a67e42a34d instead of &scope=read_write&wc_auth_nonce=a67e42a34d.

    This throws an error on my platform stating that a potentially dangerous argument (&) was detected. I’ve made a test using Postman, making a POST request to the same URL I got an error too, changing & char to ? char solves the problem.

    Also, I’m getting Error message from WooCommerce after approving connection with message:
    “Error: An error occurred in the request and at the time were unable to send the consumer data.”

    This happens always, even with no other plugin installed.

    Some background:
    Environment:
    PHP 7.4.15
    WP 5.7
    WC 5.1.0

    Server:
    Running on OpenLiteSpeed

    • This topic was modified 3 years, 7 months ago by edsonsantoro.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Wrong formatted REST API Auth callback_url’ is closed to new replies.