---
title: "Add OAuth Service (Realtime)"
slug: "add-oauth-service-realtime"
updated: 2026-05-18T14:33:16Z
published: 2026-05-18T14:33:16Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Add OAuth Service (Realtime)

![](https://cdn.us.document360.io/27ca1fd4-36d7-4cde-b4eb-97fc1652954c/Images/Documentation/Deprecated.svg)

Add an [OAuth service](https://docs.rocket.chat/oauth) for users to log in to your workspace.

| Method | Requires Auth | Permission |
| --- | --- | --- |
| `addOAuthService` | Yes | `add-oauth-service` |

## Payload parameters

| Argument | Example | Required | Description |
| --- | --- | --- | --- |
| `name` | `okta` | Required | The name of the OAuth service you want to add. |

## Example call

```json
{
    "msg": "method",
    "method": "addOAuthService",
    "id": "2",
    "params": [
        "Okta"
    ]
}
```

## Example response

### Success

```json
{
    "msg": "updated",
    "methods": [
        "2"
    ]
}
```

### Error

Any of the following errors can occur on the endpoint.

- **No Permission**: Occurs when the authenticated user doesn't have the `add-oauth-service` permission.

```json
{
    "msg": "result",
    "id": "2",
    "error": {
        "isClientSafe": true,
        "error": "error-action-not-allowed",
        "reason": "Adding OAuth Services is not allowed",
        "details": {
            "method": "addOAuthService",
            "action": "Adding_OAuth_Services"
        },
        "message": "Adding OAuth Services is not allowed [error-action-not-allowed]",
        "errorType": "Meteor.Error"
    }
}
```

## Changelog

| Version | Description |
| --- | --- |
| 0.51.0 | Added |
