curl --request POST \
--url https://api.example.com/{connector_id}/refresh_access_token \
--header 'Content-Type: application/json' \
--data '
{
"request": {
"client_id": "<string>",
"client_secret": "<string>",
"refresh_token": "<string>",
"credential_id": "<string>",
"state": "<string>"
},
"include_raw_data": true,
"page": {
"token": "<string>",
"size": 123
},
"settings": {}
}
'import requests
url = "https://api.example.com/{connector_id}/refresh_access_token"
payload = {
"request": {
"client_id": "<string>",
"client_secret": "<string>",
"refresh_token": "<string>",
"credential_id": "<string>",
"state": "<string>"
},
"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>',
client_secret: '<string>',
refresh_token: '<string>',
credential_id: '<string>',
state: '<string>'
},
include_raw_data: true,
page: {token: '<string>', size: 123},
settings: {}
})
};
fetch('https://api.example.com/{connector_id}/refresh_access_token', 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}/refresh_access_token",
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>',
'client_secret' => '<string>',
'refresh_token' => '<string>',
'credential_id' => '<string>',
'state' => '<string>'
],
'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}/refresh_access_token"
payload := strings.NewReader("{\n \"request\": {\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"refresh_token\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"state\": \"<string>\"\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}/refresh_access_token")
.header("Content-Type", "application/json")
.body("{\n \"request\": {\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"refresh_token\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"state\": \"<string>\"\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}/refresh_access_token")
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 \"client_secret\": \"<string>\",\n \"refresh_token\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"state\": \"<string>\"\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": {
"access_token": "<string>",
"token_type": "bearer",
"refresh_token": "<string>",
"state": "<string>"
},
"raw_data": "<unknown>",
"page": {
"token": "<string>",
"size": 123
}
}/{connector_id}/refresh_access_token
Refresh Access Token
Get a new access token (and possibly new refresh token) using the previous refresh token. It is used when the current access token expires, ensuring seamless access to the API. Lumos systems attempt to only make one of these calls at a time per app tenant.
curl --request POST \
--url https://api.example.com/{connector_id}/refresh_access_token \
--header 'Content-Type: application/json' \
--data '
{
"request": {
"client_id": "<string>",
"client_secret": "<string>",
"refresh_token": "<string>",
"credential_id": "<string>",
"state": "<string>"
},
"include_raw_data": true,
"page": {
"token": "<string>",
"size": 123
},
"settings": {}
}
'import requests
url = "https://api.example.com/{connector_id}/refresh_access_token"
payload = {
"request": {
"client_id": "<string>",
"client_secret": "<string>",
"refresh_token": "<string>",
"credential_id": "<string>",
"state": "<string>"
},
"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>',
client_secret: '<string>',
refresh_token: '<string>',
credential_id: '<string>',
state: '<string>'
},
include_raw_data: true,
page: {token: '<string>', size: 123},
settings: {}
})
};
fetch('https://api.example.com/{connector_id}/refresh_access_token', 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}/refresh_access_token",
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>',
'client_secret' => '<string>',
'refresh_token' => '<string>',
'credential_id' => '<string>',
'state' => '<string>'
],
'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}/refresh_access_token"
payload := strings.NewReader("{\n \"request\": {\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"refresh_token\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"state\": \"<string>\"\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}/refresh_access_token")
.header("Content-Type", "application/json")
.body("{\n \"request\": {\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"refresh_token\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"state\": \"<string>\"\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}/refresh_access_token")
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 \"client_secret\": \"<string>\",\n \"refresh_token\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"state\": \"<string>\"\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": {
"access_token": "<string>",
"token_type": "bearer",
"refresh_token": "<string>",
"state": "<string>"
},
"raw_data": "<unknown>",
"page": {
"token": "<string>",
"size": 123
}
}Path Parameters
Body
Generic request model.
The main request payload.
Show child attributes
Show child attributes
Whether to include raw data in the response.
Pagination information for the request.
Show child attributes
Show child attributes
Connector-specific settings for the request.
These are settings that are shared across all capabilities.
Usually contain additional required configuration options not specified by the capability schema.
Show child attributes
Show child attributes
Response
The request has succeeded.
- Option 1
- Option 2
Response containing the OAuth credentials after refreshing an access token.