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

Use a permanent token #29

Closed anavc94 closed 3 years ago

anavc94 commented 3 years ago

Hi,

I have successfully get an access token and I have made some GET requests without any problem. However, after some time I started getting these responses:

{'statusCode': 401, 'status': 401, 'code': 401, 'message': 'Invalid token: access token has expired', 'name': 'invalid_token'}

I want to deploy my application in Production, how can I get a permanent token?

Regards!

cmsdroff commented 3 years ago

Hi @anavc94

We are using OAuth, so you just need to include in your code the call to the token endpoint as part of your process, then make your request to Boxtech.

The tokens will need to be refreshed, just like logging into a system they will expire.

Hope this answers the question.

Closing the issue for the time being please let me know if anything else is needed