Intent
Applies the supplied changes to the client.
When to call it
Call this when the client already exists and its stored values need to change.
Access boundary
Use the credential type and authentication scheme shown for this operation.
Successful result
A successful request returns 200. The response schema below defines the body your integration receives.
Operational notes
Update an OAuth2 client.
PUT
/
v1
/
oauth2
/
register
/
{client_id}
Change Client
curl --request PUT \
--url https://api.getruba.com/v1/oauth2/register/{client_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"redirect_uris": [
"<string>"
],
"client_name": "<string>",
"client_id": "<string>",
"token_endpoint_auth_method": "client_secret_post",
"grant_types": [
"authorization_code",
"refresh_token"
],
"response_types": [
"code"
],
"scope": "openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write",
"client_uri": "<string>",
"logo_uri": "<string>",
"tos_uri": "<string>",
"policy_uri": "<string>",
"default_sub_type": "user"
}
'import requests
url = "https://api.getruba.com/v1/oauth2/register/{client_id}"
payload = {
"redirect_uris": ["<string>"],
"client_name": "<string>",
"client_id": "<string>",
"token_endpoint_auth_method": "client_secret_post",
"grant_types": ["authorization_code", "refresh_token"],
"response_types": ["code"],
"scope": "openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write",
"client_uri": "<string>",
"logo_uri": "<string>",
"tos_uri": "<string>",
"policy_uri": "<string>",
"default_sub_type": "user"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
redirect_uris: ['<string>'],
client_name: '<string>',
client_id: '<string>',
token_endpoint_auth_method: 'client_secret_post',
grant_types: ['authorization_code', 'refresh_token'],
response_types: ['code'],
scope: 'openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write',
client_uri: '<string>',
logo_uri: '<string>',
tos_uri: '<string>',
policy_uri: '<string>',
default_sub_type: 'user'
})
};
fetch('https://api.getruba.com/v1/oauth2/register/{client_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getruba.com/v1/oauth2/register/{client_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'redirect_uris' => [
'<string>'
],
'client_name' => '<string>',
'client_id' => '<string>',
'token_endpoint_auth_method' => 'client_secret_post',
'grant_types' => [
'authorization_code',
'refresh_token'
],
'response_types' => [
'code'
],
'scope' => 'openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write',
'client_uri' => '<string>',
'logo_uri' => '<string>',
'tos_uri' => '<string>',
'policy_uri' => '<string>',
'default_sub_type' => 'user'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getruba.com/v1/oauth2/register/{client_id}"
payload := strings.NewReader("{\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"client_name\": \"<string>\",\n \"client_id\": \"<string>\",\n \"token_endpoint_auth_method\": \"client_secret_post\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"response_types\": [\n \"code\"\n ],\n \"scope\": \"openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write\",\n \"client_uri\": \"<string>\",\n \"logo_uri\": \"<string>\",\n \"tos_uri\": \"<string>\",\n \"policy_uri\": \"<string>\",\n \"default_sub_type\": \"user\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.getruba.com/v1/oauth2/register/{client_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"client_name\": \"<string>\",\n \"client_id\": \"<string>\",\n \"token_endpoint_auth_method\": \"client_secret_post\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"response_types\": [\n \"code\"\n ],\n \"scope\": \"openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write\",\n \"client_uri\": \"<string>\",\n \"logo_uri\": \"<string>\",\n \"tos_uri\": \"<string>\",\n \"policy_uri\": \"<string>\",\n \"default_sub_type\": \"user\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getruba.com/v1/oauth2/register/{client_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"client_name\": \"<string>\",\n \"client_id\": \"<string>\",\n \"token_endpoint_auth_method\": \"client_secret_post\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"response_types\": [\n \"code\"\n ],\n \"scope\": \"openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write\",\n \"client_uri\": \"<string>\",\n \"logo_uri\": \"<string>\",\n \"tos_uri\": \"<string>\",\n \"policy_uri\": \"<string>\",\n \"default_sub_type\": \"user\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Body
application/json
Minimum string length:
1Available options:
client_secret_basic, client_secret_post, none Available options:
authorization_code, refresh_token Allowed value:
"code"scope
string
default:openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write
Required string length:
1 - 2083Required string length:
1 - 2083Required string length:
1 - 2083Available options:
user, organization Response
Successful Response
Previous
Delete Client### Intent
Removes the client.
### When to call it
Call this only after your application has identified the client that should be removed.
### Access boundary
Use the credential type and authentication scheme shown for this operation.
### Successful result
A successful request returns `200`. The response schema below defines the body your integration receives.
### Operational notes
Delete an OAuth2 client.
Next
⌘I
Change Client
curl --request PUT \
--url https://api.getruba.com/v1/oauth2/register/{client_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"redirect_uris": [
"<string>"
],
"client_name": "<string>",
"client_id": "<string>",
"token_endpoint_auth_method": "client_secret_post",
"grant_types": [
"authorization_code",
"refresh_token"
],
"response_types": [
"code"
],
"scope": "openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write",
"client_uri": "<string>",
"logo_uri": "<string>",
"tos_uri": "<string>",
"policy_uri": "<string>",
"default_sub_type": "user"
}
'import requests
url = "https://api.getruba.com/v1/oauth2/register/{client_id}"
payload = {
"redirect_uris": ["<string>"],
"client_name": "<string>",
"client_id": "<string>",
"token_endpoint_auth_method": "client_secret_post",
"grant_types": ["authorization_code", "refresh_token"],
"response_types": ["code"],
"scope": "openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write",
"client_uri": "<string>",
"logo_uri": "<string>",
"tos_uri": "<string>",
"policy_uri": "<string>",
"default_sub_type": "user"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
redirect_uris: ['<string>'],
client_name: '<string>',
client_id: '<string>',
token_endpoint_auth_method: 'client_secret_post',
grant_types: ['authorization_code', 'refresh_token'],
response_types: ['code'],
scope: 'openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write',
client_uri: '<string>',
logo_uri: '<string>',
tos_uri: '<string>',
policy_uri: '<string>',
default_sub_type: 'user'
})
};
fetch('https://api.getruba.com/v1/oauth2/register/{client_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getruba.com/v1/oauth2/register/{client_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'redirect_uris' => [
'<string>'
],
'client_name' => '<string>',
'client_id' => '<string>',
'token_endpoint_auth_method' => 'client_secret_post',
'grant_types' => [
'authorization_code',
'refresh_token'
],
'response_types' => [
'code'
],
'scope' => 'openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write',
'client_uri' => '<string>',
'logo_uri' => '<string>',
'tos_uri' => '<string>',
'policy_uri' => '<string>',
'default_sub_type' => 'user'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getruba.com/v1/oauth2/register/{client_id}"
payload := strings.NewReader("{\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"client_name\": \"<string>\",\n \"client_id\": \"<string>\",\n \"token_endpoint_auth_method\": \"client_secret_post\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"response_types\": [\n \"code\"\n ],\n \"scope\": \"openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write\",\n \"client_uri\": \"<string>\",\n \"logo_uri\": \"<string>\",\n \"tos_uri\": \"<string>\",\n \"policy_uri\": \"<string>\",\n \"default_sub_type\": \"user\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.getruba.com/v1/oauth2/register/{client_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"client_name\": \"<string>\",\n \"client_id\": \"<string>\",\n \"token_endpoint_auth_method\": \"client_secret_post\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"response_types\": [\n \"code\"\n ],\n \"scope\": \"openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write\",\n \"client_uri\": \"<string>\",\n \"logo_uri\": \"<string>\",\n \"tos_uri\": \"<string>\",\n \"policy_uri\": \"<string>\",\n \"default_sub_type\": \"user\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getruba.com/v1/oauth2/register/{client_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"client_name\": \"<string>\",\n \"client_id\": \"<string>\",\n \"token_endpoint_auth_method\": \"client_secret_post\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"response_types\": [\n \"code\"\n ],\n \"scope\": \"openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write\",\n \"client_uri\": \"<string>\",\n \"logo_uri\": \"<string>\",\n \"tos_uri\": \"<string>\",\n \"policy_uri\": \"<string>\",\n \"default_sub_type\": \"user\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}