Create an OAuth application
curl --request POST \
--url https://app.rookoo.ai/api/v1/accounts/{account_id}/oauth_applications \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"oauth_application": {
"name": "My Integration",
"redirect_uri": "https://myapp.com/oauth/callback",
"scopes": "profile read write",
"confidential": true
}
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
oauth_application: {
name: 'My Integration',
redirect_uri: 'https://myapp.com/oauth/callback',
scopes: 'profile read write',
confidential: true
}
})
};
fetch('https://app.rookoo.ai/api/v1/accounts/{account_id}/oauth_applications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.rookoo.ai/api/v1/accounts/{account_id}/oauth_applications"
payload = { "oauth_application": {
"name": "My Integration",
"redirect_uri": "https://myapp.com/oauth/callback",
"scopes": "profile read write",
"confidential": True
} }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"name": "<string>",
"uid": "<string>",
"secret": "<string>",
"redirect_uri": "<string>",
"scopes": "<string>",
"confidential": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}OAuth Applications
Create an OAuth application
Register a new account-scoped OAuth 2.0 client. Administrator only.
POST
/
api
/
v1
/
accounts
/
{account_id}
/
oauth_applications
Create an OAuth application
curl --request POST \
--url https://app.rookoo.ai/api/v1/accounts/{account_id}/oauth_applications \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"oauth_application": {
"name": "My Integration",
"redirect_uri": "https://myapp.com/oauth/callback",
"scopes": "profile read write",
"confidential": true
}
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
oauth_application: {
name: 'My Integration',
redirect_uri: 'https://myapp.com/oauth/callback',
scopes: 'profile read write',
confidential: true
}
})
};
fetch('https://app.rookoo.ai/api/v1/accounts/{account_id}/oauth_applications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.rookoo.ai/api/v1/accounts/{account_id}/oauth_applications"
payload = { "oauth_application": {
"name": "My Integration",
"redirect_uri": "https://myapp.com/oauth/callback",
"scopes": "profile read write",
"confidential": True
} }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"name": "<string>",
"uid": "<string>",
"secret": "<string>",
"redirect_uri": "<string>",
"scopes": "<string>",
"confidential": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Authorizations
This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.
Path Parameters
The numeric ID of the account
Body
application/json
Show child attributes
Show child attributes
Response
Created
OAuth application ID
Application name
Client ID
Client secret
Redirect URI(s), newline-separated if multiple
Space-separated scopes (profile, accounts, read, write)
Whether the client is confidential (has a secret)