Cannot Get My Access Token With Oauth2 In Laravel

Discussion in 'Shapeways API' started by 1625630_deleted, Jul 21, 2017.

  1. Hi,

    I'm new to the ShapewaysAPI but I've been able to get a good start, following the API OAuth2 documentation here - https://developers.shapeways.com/learn/understanding-authorization. I'm building out an integration with the Shapeways API (v2), and I've created an app and obtained my client_id and client_secret. I've also successfully obtained my authorization_code, which understandably changes with each request.

    However, I've not been able to go on from there. I followed the documentation (https://developers.shapeways.com/learn/understanding-authorization#auth-grant), and I'm stuck at the 4th step. I cannot get my access token. Each time I send a GET request from my service (with authorization code and other required parameters), I receive a 403 Method Not Found response. I also tried using POST/HEAD/OPTIONS methods with Postman, using the same parameters, but none has worked. Some even returned with a 400 - Bad Request response.

    What could I be doing wrong, or what am I missing?

    Note: My related tech stack is PHP7.1 and Laravel 5.4 framework. I'm also using GuzzleHTTP Client (^6.3) to make the API requests.
    Thanks
     
    adexphem likes this.
  2. 1064125_deleted
    1064125_deleted Shapeways Employee Product Team
    @elchroy This might be faulty documentation, could you try instead of providing the params as POST body and not as URI params and request via POST and not GET.