Possible to get user id from email from api?
-
I am trying to implement a reply by email feature - using PHP and have successfully replied to topics as another user by passing the _uid parameter.
And that works great.However, I need to be able to determine their uid from their email address..
I tried to use the /api/users/search endpoint but did not get any useful from itI am aware that I could just ask Mongo - which is what I am using - but I can't because
- I am not on the same server
- I don't have the option to install the PHP Mongo extension (Dreamhost)
If it is not currently possible to grab the uid from the email/username, then I guess that part has to wait until I am able to get Mongo and the extension installed..
-
You can use the newly added routes https://github.com/NodeBB/NodeBB/blob/master/src/routes/api.js#L17
For example https://community.nodebb.org/api/user/email/[email protected]
-
They are not in v0.9.2, am I right?
I will see if I can somehow manage to get NodeBB master and the write api to magically work
However, that is really awesome
-
You are awesome
EDIT: indeed, and it works!
-
@baris said in Possible to get user id from email from api?:
https://community.nodebb.org/api/user/email/[email protected]
Hi @baris, how can I get this request sent from a python script and get pre-authenticated via Python?
I tried with authorization bearer token but it seems it works only with api/v3, and in api v3 I've no chance to retrieve the user id from an email.Thanks for any help