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.

    https://github.com/NodeBB/nodebb-plugin-write-api

    It's the deprecated nodebb-plugin-write-api but I think it is still valid.


  • @dogs ah, i must have skimmed over that last part of the note. makes sense, thanks for pointing that out!

Suggested Topics

| |