cURL
curl --request POST \
--url https://api.example.com/{connector_id}/get_authorization_url \
--header 'Content-Type: application/json' \
--data '
{
"request": {
"client_id": "<string>",
"scopes": [
"<string>"
],
"redirect_uri": "<string>",
"state": "<string>",
"credential_id": "<string>",
"form_data": {}
},
"include_raw_data": true,
"page": {
"token": "<string>",
"size": 123
},
"settings": {}
}
'import requests
url = "https://api.example.com/{connector_id}/get_authorization_url"
payload = {
"request": {
"client_id": "<string>",
"scopes": ["<string>"],
"redirect_uri": "<string>",
"state": "<string>",
"credential_id": "<string>",
"form_data": {}
},
"include_raw_data": True,
"page": {
"token": "<string>",
"size": 123
},
"settings": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
request: {
client_id: '<string>',
scopes: ['<string>'],
redirect_uri: '<string>',
state: '<string>',
credential_id: '<string>',
form_data: {}
},
include_raw_data: true,
page: {token: '<string>', size: 123},
settings: {}
})
};
fetch('https://api.example.com/{connector_id}/get_authorization_url', 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.example.com/{connector_id}/get_authorization_url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'request' => [
'client_id' => '<string>',
'scopes' => [
'<string>'
],
'redirect_uri' => '<string>',
'state' => '<string>',
'credential_id' => '<string>',
'form_data' => [
]
],
'include_raw_data' => true,
'page' => [
'token' => '<string>',
'size' => 123
],
'settings' => [
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/{connector_id}/get_authorization_url"
payload := strings.NewReader("{\n \"request\": {\n \"client_id\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"redirect_uri\": \"<string>\",\n \"state\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"form_data\": {}\n },\n \"include_raw_data\": true,\n \"page\": {\n \"token\": \"<string>\",\n \"size\": 123\n },\n \"settings\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.example.com/{connector_id}/get_authorization_url")
.header("Content-Type", "application/json")
.body("{\n \"request\": {\n \"client_id\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"redirect_uri\": \"<string>\",\n \"state\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"form_data\": {}\n },\n \"include_raw_data\": true,\n \"page\": {\n \"token\": \"<string>\",\n \"size\": 123\n },\n \"settings\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{connector_id}/get_authorization_url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"request\": {\n \"client_id\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"redirect_uri\": \"<string>\",\n \"state\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"form_data\": {}\n },\n \"include_raw_data\": true,\n \"page\": {\n \"token\": \"<string>\",\n \"size\": 123\n },\n \"settings\": {}\n}"
response = http.request(request)
puts response.read_body{
"response": {
"authorization_url": "<string>",
"code_verifier": "<string>"
},
"raw_data": "<unknown>",
"page": {
"token": "<string>",
"size": 123
}
}OAuth Capabilities
/{connector_id}/get_authorization_url
Get OAuth authorization URL for a connector.
Constructs and returns the OAuth 2.0 authorization URL for the specified connector. This URL can be used to direct users to the authorization page where they can grant access to their account. Upon authorization completion, users will be redirected to the specified callback URL.
POST
/
{connector_id}
/
get_authorization_url
cURL
curl --request POST \
--url https://api.example.com/{connector_id}/get_authorization_url \
--header 'Content-Type: application/json' \
--data '
{
"request": {
"client_id": "<string>",
"scopes": [
"<string>"
],
"redirect_uri": "<string>",
"state": "<string>",
"credential_id": "<string>",
"form_data": {}
},
"include_raw_data": true,
"page": {
"token": "<string>",
"size": 123
},
"settings": {}
}
'import requests
url = "https://api.example.com/{connector_id}/get_authorization_url"
payload = {
"request": {
"client_id": "<string>",
"scopes": ["<string>"],
"redirect_uri": "<string>",
"state": "<string>",
"credential_id": "<string>",
"form_data": {}
},
"include_raw_data": True,
"page": {
"token": "<string>",
"size": 123
},
"settings": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
request: {
client_id: '<string>',
scopes: ['<string>'],
redirect_uri: '<string>',
state: '<string>',
credential_id: '<string>',
form_data: {}
},
include_raw_data: true,
page: {token: '<string>', size: 123},
settings: {}
})
};
fetch('https://api.example.com/{connector_id}/get_authorization_url', 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.example.com/{connector_id}/get_authorization_url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'request' => [
'client_id' => '<string>',
'scopes' => [
'<string>'
],
'redirect_uri' => '<string>',
'state' => '<string>',
'credential_id' => '<string>',
'form_data' => [
]
],
'include_raw_data' => true,
'page' => [
'token' => '<string>',
'size' => 123
],
'settings' => [
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/{connector_id}/get_authorization_url"
payload := strings.NewReader("{\n \"request\": {\n \"client_id\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"redirect_uri\": \"<string>\",\n \"state\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"form_data\": {}\n },\n \"include_raw_data\": true,\n \"page\": {\n \"token\": \"<string>\",\n \"size\": 123\n },\n \"settings\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.example.com/{connector_id}/get_authorization_url")
.header("Content-Type", "application/json")
.body("{\n \"request\": {\n \"client_id\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"redirect_uri\": \"<string>\",\n \"state\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"form_data\": {}\n },\n \"include_raw_data\": true,\n \"page\": {\n \"token\": \"<string>\",\n \"size\": 123\n },\n \"settings\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{connector_id}/get_authorization_url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"request\": {\n \"client_id\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"redirect_uri\": \"<string>\",\n \"state\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"form_data\": {}\n },\n \"include_raw_data\": true,\n \"page\": {\n \"token\": \"<string>\",\n \"size\": 123\n },\n \"settings\": {}\n}"
response = http.request(request)
puts response.read_body{
"response": {
"authorization_url": "<string>",
"code_verifier": "<string>"
},
"raw_data": "<unknown>",
"page": {
"token": "<string>",
"size": 123
}
}Body
application/json
Generic request model.
Response
200 - application/json
The request has succeeded.
Was this page helpful?