Skip to main content
PATCH
/
oauth
/
{id}
Update an OAuth client
curl --request PATCH \
  --url https://api.reelevant.com/v2/datasources/oauth/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "method": "GET",
  "mode": "refresh_token",
  "tokenUrl": "https://login.salesforce.com/services/oauth2/token",
  "authorizeUrl": "https://login.salesforce.com/services/oauth2/authorize",
  "clientId": "<string>",
  "clientSecret": "<string>",
  "scopes": [
    "<string>"
  ],
  "customPayload": "{ payload: { query: { access_type: 'offline' } } }",
  "accessTokenPath": "<string>",
  "accessTokenHeader": "x-shopify-access-token",
  "accessTokenHeaderPrefix": "google",
  "tokenExpiration": 123,
  "configuration": {
    "method": "GET",
    "mode": "refresh_token",
    "tokenUrl": "https://login.salesforce.com/services/oauth2/token",
    "authorizeUrl": "https://login.salesforce.com/services/oauth2/authorize",
    "clientId": "<string>",
    "clientSecret": "<string>",
    "scopes": [
      "<string>"
    ],
    "customPayload": "{ payload: { query: { access_type: 'offline' } } }",
    "accessTokenPath": "<string>",
    "accessTokenHeader": "x-shopify-access-token",
    "accessTokenHeaderPrefix": "google",
    "tokenExpiration": 123
  }
}
EOF
{
  "status": "success",
  "program": "<string>",
  "version": "<string>",
  "datetime": "<string>",
  "message": "<string>",
  "data": {
    "companyId": "<string>",
    "resourceGroupIds": [
      "<string>"
    ],
    "versions": [
      "<string>"
    ],
    "archivedAt": "2023-11-07T05:31:56Z"
  },
  "code": 123
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

id
string
required
Pattern: ^[0-9a-fA-F]{24}$

Body

application/json
method
Available options:
GET
mode
enum<string>
default:refresh_token
Available options:
password,
client_credentials,
refresh_token,
access_token,
custom_payload,
jwt_bearer
tokenUrl
string
Pattern: ^(https?):\/\/[^\s$.?#].([^\s]|\x20)*$
Example:

"https://login.salesforce.com/services/oauth2/token"

authorizeUrl
string
Pattern: ^(https?):\/\/[^\s$.?#].([^\s]|\x20)*$
Example:

"https://login.salesforce.com/services/oauth2/authorize"

clientId
string
clientSecret
string
write-only
scopes
string[]
customPayload
object
Example:

"{ payload: { query: { access_type: 'offline' } } }"

accessTokenPath
string
accessTokenHeader
string
default:authorization
Example:

"x-shopify-access-token"

accessTokenHeaderPrefix
string
Example:

"google"

tokenExpiration
number
configuration
object

Response

Ok

status
enum<string>
required
Available options:
success
program
string
required
version
string
required
datetime
string
required
message
string
required
data
object
required
code
number