Api event user set user active: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
Server@tygron.com (talk | contribs)
No edit summary
Server@tygron.com (talk | contribs)
No edit summary
 
Line 40: Line 40:
|}
|}
===Example POST===
===Example POST===
Curl example POST
<syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/event/user/set_user_active/' -H 'Content-Type: application/json' -H 'Authorization: Basic <credentials>' -d '[ "", "Username", true ]'
</syntaxhighlight>
JavaScript example POST
<syntaxhighlight lang="text" copy>var options = {
 method: "POST",
 headers: { "Content-Type": "application/json", "Authorization": "Basic <credentials>" },
 body: '[ "", "Username", true ]'
};
fetch("https://engine.tygron.com/api/event/user/set_user_active/", options)
 .then(response => response.text())
 .then(result => console.log(result))
 .catch(error => console.log('error', error));
</syntaxhighlight>
{{article end|seealso=*[[Api event user]]
{{article end|seealso=*[[Api event user]]
}}
}}


[[Category:API]]
[[Category:API]]

Latest revision as of 15:18, 20 November 2026

API Endpoint: api/event/user/set_user_active/

Description: Set whether a specified user account is active. Returns whether the user was successfully updated.

Index Importance Type Description Values
0 OPTIONAL (String) Domain Name (optional, leave empty by default)
1 REQUIRED (String) Username
2 REQUIRED (true, false) Whether account should be active true or false

Response Codes

Response Code: Description
200 Boolean (Content was updated)
300-600 Codes Overview

Example POST

Curl example POST

curl 'https://engine.tygron.com/api/event/user/set_user_active/' -H 'Content-Type: application/json' -H 'Authorization: Basic <credentials>' -d '[ "", "Username", true ]'

JavaScript example POST

var options = {
 method: "POST",
 headers: { "Content-Type": "application/json", "Authorization": "Basic <credentials>" },
 body: '[ "", "Username", true ]'
};
fetch("https://engine.tygron.com/api/event/user/set_user_active/", options)
 .then(response => response.text())
 .then(result => console.log(result))
 .catch(error => console.log('error', error));

See also