I am currently developing an app that collects EXIF data from a limited subset (I respect API limits and do not make more than allowed number of requests daily, actually way less now) of iNat observation photos to get some statistics (primarily about the cameras used by observers). Unfortunately there is no dedicated API to access these data, so I have to scrape /photos/ pages as shown here.
EXIF data is only visible to logged in users, so I’ve registered the iNat application and started using a JWT token received through it to download a page with a photo and get EXIF data from it.
At first there were no problems, but since Friday evening inaturalist.org (the website, not the JSON API) started ignoring my access token and just responding with the page as it appears to anonymous users.
If I manually insert a token received in the browser via https://www.inaturalist.org/users/api_token into the app code, everything works fine.
Is this some general bug or is it just an issue with my app?
UPD: Looks like this issue was caused by pyinaturalist get_access_token function, for some reason it doesn’t update expired tokens. Adding refresh=true resovled it.