const api = await app.require('api');
You can only use this from within browser dev console (and some limited other places).
Instead you should use
require(['api'], (api) => { api.put(`/groups/test/membership/1550`).then(() => { ... }); });I found the api v3 recently, it is amazing!
I think the doc maybe is not complete when i can't wait to use it.
Here(https://docs.nodebb.org/api/#section/Overview/Authentication) introduced something about the authentication, but it seems like haven't remind this param _uid
, the request can't work well whitout it.
Maybe is my problem I can't find the description about it, so I post this to confrim.
In the end, Thanks for everything you did and doing.