Set or rotate this org’s OAuth application
/connector/{slug}/oauth-app
Replaces the stored application wholesale, with one exception the setup form depends on: omitting `client_secret` keeps the secret already stored, so correcting a typo in the client id cannot destroy a working secret. Send both to rotate. Scope overrides (`scope`, `optional_scope`, `user_scope`) are optional; omit them to keep the connector’s catalog scopes, or send arrays to replace them. Endpoint fields (token host, other authorize params) are not accepted here by design. Returns the same shape as the read, so the secret does not come back. Requires `connector:manage`.
Path Parameters
Connector slug.
Request Body
Omit to keep the stored secret. Never returned by any endpoint.
Omit to keep the catalog scopes; an array overrides them wholesale.
Authorize-URL scopes (params.user_scope), separated by spaces or commas and stored space-separated. Only where supports_user_scope is true; omit to clear.
Response Body
Whether a secret is stored. The secret itself is never returned.
Which application connects on this connector use.
platform_defaultbyoa
Scope overrides this org stored, or null when it kept the catalog scopes.
Whether this connector’s provider takes user token scopes (Slack does). Where false, a user_scope that differs from the stored one is refused with 400.
Space-separated authorize-URL scopes (params.user_scope), or null. Null also when one is stored but held back, see user_scope_masked.
True when a user_scope is stored encrypted by an older write and cannot be read or changed here. A PUT that sets user_scope then answers 409.
curl -X PUT 'https://api.elaichi.ai/connector/<slug>/oauth-app' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"client_id":"your_client_id","client_secret":"your_client_secret","scope":[],"optional_scope":[],"user_scope":"your_user_scope"}'const body = {
"client_id": "your_client_id",
"client_secret": "your_client_secret",
"scope": [],
"optional_scope": [],
"user_scope": "your_user_scope"
};
const response = await fetch('https://api.elaichi.ai/connector/<slug>/oauth-app', {
method: 'PUT',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/connector/<slug>/oauth-app"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
payload = {
"client_id": "your_client_id",
"client_secret": "your_client_secret",
"scope": [],
"optional_scope": [],
"user_scope": "your_user_scope"
}
response = requests.put(url, headers=headers, json=payload)
print(response.json())