Unsubscribe from multiple items at one time on Subscriptions page

ok. well, just for reference, if you ever do get a list of observations you want to un/subscribe to (or for anyone else who has such a list), you can do something like the following in Windows to un/subscribe.

  1. suppose your observations are ids 123 and 456.

  2. while signed into iNaturalist, open https://www.inaturalist.org/users/api_token in your web browser.

  3. that should display like {"api_token":"J.W.T"}, where J.W.T will be some encoded string. copy the J.W.T value.

  4. now open up a plain text editor (like Notepad)

  5. in your text editor, you’ll add a few commands. the first line is just setting a JWT variable, and you would replace J.W.T with whatever the value is that you copied in step #3 above. after that first line, for each observation, add a line to un/subscribe and a second line to wait up to 1 second. the line with the command to un/subscribe references the observation ID, which will change with each observation. (note that the same command subscribes or unsubscribes, depending on the existing subscription state – it’s effectively just toggling between states.) the timeout is there to limit how quickly the commands will be sent to the iNat API.

    set JWT=J.W.T
    curl -X POST "https://api.inaturalist.org/v1/subscriptions/observation/123/subscribe" -d "" -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: %JWT%"
    timeout 1
    curl -X POST "https://api.inaturalist.org/v1/subscriptions/observation/456/subscribe" -d "" -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: %JWT%"
    timeout 1

    (it’s possible to make the script fancier, if you like, but this gives you a general idea of what needs to happen.)

  6. save that text file with a .bat extension

  7. run your new batch file.