bic-org / Boxtech

Boxtech API is a global container database containing technical and safety information, such as tare weight, size/type and max stacking capacity for containers.
https://www.bic-boxtech.org
25 stars 7 forks source link

Issue with getting the token #33

Closed ignacioaristimuno closed 2 years ago

ignacioaristimuno commented 3 years ago

Hi All,

First, thank you for developing this tool. I believe this could be really useful. I was having some trouble getting the access token. I've followed the instructions for the 'Getting Started' guide and this is the response I get when clicking the 'Send' button:

{ "statusCode": 400, "status": 400, "code": 400, "message": "Invalid grant: user credentials are invalid", "name": "invalid_grant" }

I have a reader user on BoxTech.

Could you help me out with this? Thank you, Ignacio

cmsdroff commented 2 years ago

Hi @ignacioaristimuno

Sorry to hear you have had some issues connecting to Boxtech, we are about to switch over to a newer version, however the auth process would be the same.

So I suggest the following:

  1. Login to https://app.bic-boxtech.org using the credentials, this verifies you have access first.
  2. If the above is ok, check your auth

In your call to the /oauth/token endpoint you should be passing in

Header

Authorization Basic YmljYXBwOmJpY3NlY3JldGFwcA== Content-Type application/x-www-form-urlencoded

Body

grant_type: password username: ignacio@domain.com password your_web_password

Let me know how you get on :)

cmsdroff commented 2 years ago

closing ticket, we will migrate to Boxtech new platform this week, please re-open if needed after the weekend once we have moved to new platform and auth.