Find a user with v3 API

I’m looking at migrating to the V3 API. Our users purchase a license key from a web store, and a 'bot generates them a key and emails it to them. With the new V3 API, in order to find a license by username or email address, I have to create a user for them. This part is easy.

If a user is a repeat customer, I would like the system to find their existing account by searching the user database for the email address, but I cannot find a search API for users in the documentation. I could list all users until I find them, but that seems like a bad idea. Is this supported, and if not, could it be added relatively easily?

I figured out that the “List all users” function can take user name or email address. I was looking for a “find” or “search”, and didn’t realize this would do what I wanted.


If you check out the php key generator sample, it exactly does the same:

Yeah, I got this working pretty easily as soon as I figured out I could do that, thanks.

Just make sure you do lookup on email, as they are guaranteed to be unique. Multiple users can have same names.