fluves/pywaterinfo

Should we switch the endpoint of HIC?

Closed this issue · 2 comments

Currently, we rely on https://www.waterinfo.be/tsmhic/KiWIS/KiWIS as the endpoint of the HIC services. However, according to the current documentation, https://hicws.vlaanderen.be/Manual_for_the_use_of_webservices_HIC.pdf, the example URLs are using the https://hicws.vlaanderen.be endpoint.

The current version works and I am able to retrieve data from the HIC services, but I assume this might not be the case when using a token. Obtaining a token, which is not the same as the ones from VMM, requires to have a User agreement. I need to check further if we can get a token for testing purposes as we got one from the VMM.

I checked to use the current code with a HIC token and this indeed does not work, as we validate the token currently with the VMM service and not the hic service:

HTTPError: 403 Client Error: Forbidden for url: http://download.waterinfo.be/kiwis-auth/token

I requested a test token for the package.

HIC calls adjusted in #26 and functional with/without token