Generating Bearer Token with Write API
-
I've been happily using the Write API (great work!!) and was able to generate bearer token through this endpoint:
/api/v3/users/{uid}/tokens
as an admin account. However when I try to generate one as a regular user, I get a forbidden, you do not have enough privileges for this action error. Is this correct? If it is, is my only option to use a master token with a_uid
parameter?Thank you!
-
@shamkim said in Generating Bearer Token with Write API:
Is this correct?
Yea it seems to be correct. Take a look at:
Note: The first token can be generated via the administration page (admin/plugins/write-api), or via the token generation route (POST /api/v1/users/{UID}/tokens) by sending in a password, but additional user tokens can be generated using an existing user/master token.
GitHub - NodeBB/nodebb-plugin-write-api: A RESTful JSON-speaking API allowing you to write things to NodeBB
A RESTful JSON-speaking API allowing you to write things to NodeBB - NodeBB/nodebb-plugin-write-api
GitHub (github.com)
It's the deprecated nodebb-plugin-write-api but I think it is still valid.