Hi there, I am using statistical api to get some data but I have a problem with it token, every time I have to get new token because it expires quickly which is not a good practice is there any way I can evitate this problem
Hi,
It should not be necessary to get a new token each time. I am not sure which platform you are using but if you are using Python I would suggest reading through this tutorial example in our documentation.
For more information about setting up your credentials you can read about this here and here.
Let us know if something is not clear
I am using javascript and axios , this is example of my code
axios.post(“https://services.sentinel-hub.com/api/v1/statistics”, data, { headers: { ‘Authorization’: Bearer ${your_token_here}
}});
the problem is that token expires so quickly
Hi,
-
How quickly is the token expiring? Some more information about them can be found here. In summary, while they do expire they should last long enough to be used for multiple requests and shouldn’t be generated every single time you send an API request.
-
Are you following the steps in the example that is here in the documentation when requesting your token?
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.