OAuth Error using Foxy HyperMedia API in WAMP

rielmediarielmedia Member
For some reason I am gettting the following error message in WAMP:
ERROR IN getOAuthTokenEndpoint

I am running the 64 bit version of WAMP 3 in Windows 10. My project is built using the Laravel 5.4 framework. I am making the initial call to the Foxy API in my base controller's constructor function.

I tried generating new integration credentials and still got the error. Aside from that, my project is running just fine on my Linux server hosted by Godaddy.

Can anyone help me out with this?
Tagged:
Comments
  • fc_adamfc_adam FoxyCart Team
    @rielmedia,

    Sorry to hear you're having trouble here. The getOAuthTokenEndpoint() function is used to get the correct token URI from the API, which is done by simply getting the API homepage. It appears on your local set up that it's failing to connect to the API at all.

    To better understand why that's not working locally for you, we'll need to find out some more information about the error.

    Within the FoxyClient.php file of the FoxyClient helper library, right at the bottom you'll find the getOAuthTokenEndpoint() function. Uncomment this line within that function and try to connect again:
    trigger_error(serialize($this->last_response->json()));

    That should hopefully output some additional details about why it's failing for you locally. You can also enable debug mode for Guzzle which should also provide some additional details. To do that, when initialising Guzzle in your code, pass a config like this:
    $guzzle_config = array(
    'defaults' => array(
    'debug' => true,
    'exceptions' => false
    )
    );

    $guzzle = new Client($guzzle_config);
    Hopefully between those two changes we can get a clearer idea of the error you're running into.
Sign In or Register to comment.