[RSS Feed/News] Mark user is_staff through rest API

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
I would like to mark a user as staff through an external application, but upon sending the request the user gets returned without the is_staff field being updated.

Here is the code that I am using to make said request:
JavaScript:

Code:
const params = new URLSearchParams();
params.append('is_staff', true)
const request = await axios.post(`https://XXXXXXXXXXXX/api/users/${userID}`, params, {
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'XF-Api-Key': 'XXXXXXXXXXXX'...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom