Create OAuth App
- Print
- DarkLight
- PDF
Create OAuth App
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Post
/api/v1/oauth-apps.create
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
.
Responses
200
Example 1
{
"application": {
"name": "test-oauth-app",
"redirectUri": "https://testuri.com",
"active": true,
"clientId": "bN9D5TjY8Cv8GqWfE",
"clientSecret": "l3HAl0lSr2VaTYZVED6EabyhNzovS8Je2JYmbjNT-V1",
"_createdAt": "2024-01-17T13:30:41.521Z",
"_updatedAt": "2024-01-17T13:30:41.521Z",
"_createdBy": {
"_id": "JFTcMhEAFbNPfnp49",
"username": "math.bar"
},
"_id": "65a7d68142a7e12453052d56"
},
"success": true
}
object
application
object
name
string
redirectUri
string
active
boolean
clientId
string
clientSecret
string
_createdAt
string
_updatedAt
string
_createdBy
object
_id
string
username
string
_id
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"
}
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
Was this article helpful?