Batch add users to collection project filters

all- I have a number projects that I’ve managed over the years where using inatrualis projects has been very useful to view species lists & observations based on users and NOT boundaries. However, when introducing projects to larger audiences like PTO meetings at local schools there is always a large percentage of users that sign up & use the iNat app but do not follow through with project signup.

I’m currently looking through user lists and adding users by hand. However, in ramping up for CNC2020 we will be managing 10-15 schools and user groups this way.

Below is the manager howto in the Collection Project Settings Explained form the https://www.inaturalist.org/pages/managing-projects#collectionsettings page.

" User: Search for and select iNaturalist users whose observations you would like to include in your project. The project will then only display observations made by those users, provided the observations meet the other project requirements. You can add multiple users. For situations involving groups, such classes and trips, this is a good way to only include observations by members of your group."

I’m hoping that someone else has a work-around that goes beyond the project manager just adding names to the project. Having a QR code that an iNaturalist user could scan would be great, albeit a lot of work for someone. Even enabling a cut &past of a list emails associated with iNaturlist logins separated by commas would be an improvement when dealing with dozens of names.

I will happily learn java script if someone can help get me started with the API. I’m assuming POST /projects/:id/join would work. My direct email is Hikerd@gmail.com. I would jump at the prospects of developing github project manager tool; a workaround or assisting in any other way to make this happen.

Thanks, h

It’s something we’ve looked into. I think comma separated names, or a CSV upload might work. Note that the Users requirement for collection projects only accepts usernames, so email addresses won’t work.

Also, and I’m sure you’re aware but others might not be, that anyone under the age of 13 can’t have their own iNaturalist account without obtaining a parent/guardian’s permission, due to privacy laws. And the only way to really obtain that permission is to sign up via the Seek by iNaturalist app.

1 Like

i think this endpoint and https://api.inaturalist.org/v1/docs/#!/Projects/post_projects_id_join only allow a single authenticated user to join a project (i.e. add yourself as a member to a project). i don’t think there’s an exisitng endpoint that would allow a user to add another user as a member of a project.

what tiwane is talking about here is different from project membership. here, he’s saying that you can set up a project to include observations from only selected users. i don’t think there’s an API endpoint for this, but you can add a comma separated list in the regular UI, as tiwane suggested. see the bottom right of this screen:

i was going to say that Javascript alone probably wouldn’t allow you to write a secure app that involves authentication, but it looks like iNat may have recently added a new OAuth flow – Proof Key for Code Exchange Flow (PKCE) – that i think will allow you to do a relatively pure Javascript-based web app that includes authenticated requests. i haven’t tried it myself, but i think you can look at these places to get started:

  1. create a new API application: https://www.inaturalist.org/oauth/applications/new
  2. read up on iNat’s PKCE flow: https://www.inaturalist.org/pages/api+reference#pkce_flow
  3. look at an example of a Javascript implementation of PKCE: https://github.com/aaronpk/pkce-vanilla-js and https://developer.okta.com/blog/2019/05/01/is-the-oauth-implicit-flow-dead
  4. a Javascript package for iNaturalist may or may not make coding easier: https://github.com/inaturalist/inaturalistjs
1 Like

@Hikerd – if you’re still thinking about writing your own JS-based app, i wanted to let you know that I tried to make a simple single-page web app that uses PKCE OAuth flow and the iNat v1 API, and i’ve confirmed that it is possible to do that.

example: https://jumear.github.io/stirfry/iNat_PKCE_flow_example.html (doesn’t work in Edge / IE)
code: https://github.com/jumear/stirfry/blob/gh-pages/iNat_PKCE_flow_example.html

I’m still not sure the API provides the capabilities to do what you were describing in your original post, but if it does, JS should allow you to achieve what you were describing.

2 Likes

I think the Project Members Only option should take care of this, so I’m closing.