mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
docs: update API docs to better outline authentication options
This commit is contained in:
@@ -31,6 +31,13 @@ info:
|
||||
|
||||
* Up until v1.14.3, this is provided by [`nodebb-plugin-write-api`](https://github.com/NodeBB/nodebb-plugin-write-api). The Write API plugin needs to be installed before authentication via bearer token is enabled on routes provided by the Read API.
|
||||
* From NodeBB v1.15.0 onwards, the Write API is available in core, and bearer authentication is available out-of-the-box
|
||||
|
||||
In both cases, a bearer token is issued in the NodeBB admin panel in order to grant access to the API.
|
||||
|
||||
There are two types of tokens:
|
||||
* A *user token* is associated with a specific uid, and all calls made are made in the name of that user
|
||||
* A *master token* is not associated with any specific uid, though a `_uid` parameter is required in the request, and then all calls are made in the name of *that* user.
|
||||
This is the only difference between the two tokens. A master token with `_uid` set to a non-administrator will not allow you to make administrative calls.
|
||||
tags:
|
||||
- name: home
|
||||
description: Routes used at the forum index only
|
||||
|
||||
@@ -15,6 +15,10 @@ info:
|
||||
Years prior to this determination, many users of NodeBB had asked for a RESTful API to call against NodeBB, which led to the creation of [`nodebb-plugin-write-api`](https://github.com/NodeBB/nodebb-plugin-write-api). In tandem with the above decision, the Write API was merged into NodeBB core in late 2020.
|
||||
|
||||
v3 of the Write API (this document) achieves rough feature parity with v2 of the Write API plugin.
|
||||
|
||||
# Authentication
|
||||
|
||||
Please see the ["Authentication" section under the Read API](../read/#section/Overview/Authentication) for more information on how to authenticate against this API in order to make calls.
|
||||
version: 1.15.0
|
||||
contact:
|
||||
email: support@nodebb.org
|
||||
|
||||
Reference in New Issue
Block a user