Refresh Token
curl --request POST \
--url https://app.aisync.link/oauth/token/refresh \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'client_id=<string>' \
--data 'client_secret=<string>' \
--data grant_type=refresh_token \
--data 'redirect_uri=<string>' \
--data 'refresh_token=<string>'import requests
url = "https://app.aisync.link/oauth/token/refresh"
payload = {
"client_id": "<string>",
"client_secret": "<string>",
"grant_type": "refresh_token",
"redirect_uri": "<string>",
"refresh_token": "<string>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
client_id: '<string>',
client_secret: '<string>',
grant_type: 'refresh_token',
redirect_uri: '<string>',
refresh_token: '<string>'
})
};
fetch('https://app.aisync.link/oauth/token/refresh', 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://app.aisync.link/oauth/token/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "client_id=%3Cstring%3E&client_secret=%3Cstring%3E&grant_type=refresh_token&redirect_uri=%3Cstring%3E&refresh_token=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://app.aisync.link/oauth/token/refresh"
payload := strings.NewReader("client_id=%3Cstring%3E&client_secret=%3Cstring%3E&grant_type=refresh_token&redirect_uri=%3Cstring%3E&refresh_token=%3Cstring%3E")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.aisync.link/oauth/token/refresh")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("client_id=%3Cstring%3E&client_secret=%3Cstring%3E&grant_type=refresh_token&redirect_uri=%3Cstring%3E&refresh_token=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aisync.link/oauth/token/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "client_id=%3Cstring%3E&client_secret=%3Cstring%3E&grant_type=refresh_token&redirect_uri=%3Cstring%3E&refresh_token=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"access_token": "<string>",
"token_type": "Bearer",
"expires_in": 123,
"refresh_token": "<string>"
}{
"error": "<string>",
"error_description": "<string>",
"message": "<string>"
}{
"error": "<string>",
"error_description": "<string>",
"message": "<string>"
}Authorization
Refresh Token
Obtain a new access token using your refresh token. Use this endpoint when your access token expires to continue making API calls without requiring user re-authorization.
POST
/
oauth
/
token
/
refresh
Refresh Token
curl --request POST \
--url https://app.aisync.link/oauth/token/refresh \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'client_id=<string>' \
--data 'client_secret=<string>' \
--data grant_type=refresh_token \
--data 'redirect_uri=<string>' \
--data 'refresh_token=<string>'import requests
url = "https://app.aisync.link/oauth/token/refresh"
payload = {
"client_id": "<string>",
"client_secret": "<string>",
"grant_type": "refresh_token",
"redirect_uri": "<string>",
"refresh_token": "<string>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
client_id: '<string>',
client_secret: '<string>',
grant_type: 'refresh_token',
redirect_uri: '<string>',
refresh_token: '<string>'
})
};
fetch('https://app.aisync.link/oauth/token/refresh', 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://app.aisync.link/oauth/token/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "client_id=%3Cstring%3E&client_secret=%3Cstring%3E&grant_type=refresh_token&redirect_uri=%3Cstring%3E&refresh_token=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://app.aisync.link/oauth/token/refresh"
payload := strings.NewReader("client_id=%3Cstring%3E&client_secret=%3Cstring%3E&grant_type=refresh_token&redirect_uri=%3Cstring%3E&refresh_token=%3Cstring%3E")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.aisync.link/oauth/token/refresh")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("client_id=%3Cstring%3E&client_secret=%3Cstring%3E&grant_type=refresh_token&redirect_uri=%3Cstring%3E&refresh_token=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aisync.link/oauth/token/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "client_id=%3Cstring%3E&client_secret=%3Cstring%3E&grant_type=refresh_token&redirect_uri=%3Cstring%3E&refresh_token=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"access_token": "<string>",
"token_type": "Bearer",
"expires_in": 123,
"refresh_token": "<string>"
}{
"error": "<string>",
"error_description": "<string>",
"message": "<string>"
}{
"error": "<string>",
"error_description": "<string>",
"message": "<string>"
}Refresh Token
Obtain a new access token using your refresh token. Use this endpoint when your access token expires to continue making API calls without requiring user re-authorization.curl --location 'https://app.aisync.link/oauth/token/refresh' \
--form 'client_id="{{client_id}}"' \
--form 'client_secret="{{client_secret}}"' \
--form 'grant_type="refresh_token"' \
--form 'redirect_uri="{{redirect_uri}}"' \
--form 'refresh_token="{{refresh_token}}"'
Refresh your access token before it expires to ensure uninterrupted API access. Most applications refresh tokens proactively when they’re close to expiration.
Body
application/x-www-form-urlencoded
Response
Token response