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.
Space-separated authorize-URL scopes (params.user_scope).
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.
Space-separated authorize-URL scopes (params.user_scope), or null.
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())