Add Custom OAuth

Prev Next
Post
/api/v1/settings.addCustomOAuth
Premium tag

Add a custom OAuth integration to your workspace. Two-factor authentication is required.

From Rocket.Chat 9.0.0, Custom OAuth is available on Starter workspaces and on all premium plans (Commercial, Government, and Defense). It is not available on Community workspaces, where this endpoint returns error-action-not-allowed. See Our Plans for details.

Permission required:

  • add-oauth-service

Changelog

Version Description
9.0.0 Added premium plan availability details.
Header parameters
X-User-Id
stringRequired

The user ID.

ExampleCkCPNctrgCDfmWLqC
X-Auth-Token
stringRequired

The authentication token.

Example1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE
x-2fa-code
string

The 2FA code. This parameter is required if 2FA is enabled in your workspace. See the Introduction to Two-Factor Authentication document for details.

x-2fa-method
string

Enter the method with which you get the 2FA code. It can be email, totp, or password. This parameter is required if 2FA is enabled in your workspace.

Body parameters
object
name
string Required

The name of the custom OAuth method that you want to add.

ExampleMyCustomOAuth
Responses
200

OK

Success
{
  "success": true
}
object
success
boolean
400

Bad Request

Missing name param
{
  "success": false,
  "error": "The parameter \"name\" is required [error-name-param-not-provided]",
  "errorType": "error-name-param-not-provided"
}
Not available on Community workspaces
{
  "success": false,
  "error": "This is an enterprise feature [error-action-not-allowed]",
  "errorType": "error-action-not-allowed"
}
object
success
boolean
error
string
errorType
string
401

Unauthorized

Authorization Error
{
  "success": false,
  "error": "You must be logged in to do this."
}
object
success
boolean
error
string
403

Forbidden

Permission Error
{
  "success": false,
  "error": "User does not have the permissions required for this action",
  "errorType": "error-forbidden"
}
object
success
boolean
error
string
errorType
string