Post
/api/v1/oauth-apps.update
Permission required: manage-oauth-apps
Header parameters
X-Auth-Token
stringRequired
The authorization token of the user.
Example9HqLlyZOugD_0YdwAJF8V47U3QHXSq
X-User-Id
stringRequired
The user ID of the user.
ExampleaobEdbYhXfu5hkeqG
Body parameters
Example 1
{
  "name": "test-oauth-app",
  "redirectUri": "https://testuri.com",
  "active": true
}object  
name
string    Required
Name of the app that you want to create.
redirectUri
string    Required
The URL to redirect the OAuth app.
active
boolean    Required
Whether the app will be active or not. Enter a boolean value, true or false.
appId
string    Required
The app ID.
Responses
200
Example 1
{
  "_id": "65a7d77142a7e12453052d59",
  "name": "test-oauth-app2",
  "redirectUri": "https://testuri2.com",
  "active": false,
  "clientId": "fxHAgLRjP3RswMe67",
  "clientSecret": "QwIAYE1_8M02p-Js8SHZyTPg7HpJm-1ZtbjuSp8bXpP",
  "_createdAt": "2024-01-17T13:34:41.445Z",
  "_updatedAt": "2024-01-17T13:37:16.966Z",
  "_createdBy": {
    "_id": "JFTcMhEAFbNPfnp49",
    "username": "math.bar"
  },
  "_updatedBy": {
    "_id": "JFTcMhEAFbNPfnp49",
    "username": "math.bar"
  },
  "success": true
}object  
_id
string    
name
string    
redirectUri
string    
active
boolean    
clientId
string    
clientSecret
string    
_createdAt
string    
_updatedAt
string    
_createdBy
object  
_id
string    
username
string    
_updatedBy
object  
_id
string    
username
string    
success
boolean    
400
Bad Request
Example 1
{
  "success": false,
  "error": "must have required property 'name' [invalid-params]",
  "errorType": "invalid-params"
}Example 2
{
  "success": false,
  "error": "must have required property 'active' [invalid-params]",
  "errorType": "invalid-params"
}Example 3
{
  "success": false,
  "error": "must have required property 'redirectUri' [invalid-params]",
  "errorType": "invalid-params"
}Example 4
{
  "success": false,
  "error": "must have required property 'appId' [invalid-params]",
  "errorType": "invalid-params"
}object  
success
boolean    
error
string    
errorType
string    
401
Unauthorized
Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}object  
status
string    
message
string