Platform Tokengenerated by our built-in platform auth provider (including SSO/SAML).API Keygenerated by user, bound toUserorService Account(starts withsk-...).
Please note that unlike Run API - Authentication,
Provider Tokens are not supported in Platform API, to perform any API requests we recommend setting up API Key.API Keys
View the API Keys Documentation page
While making request, you must also pass instance identifier of your instance.
Headers- preferred option to pass your tokens.
curl -X GET "https://api.revong.com/api/v1/me/time" \
-H "Authorization: Bearer sk-..." \
-H "Instance: instance_shortId_or_id"
import * as axios from 'axios';
const fetchTime = async () => {
const headers = {
'Authorization': 'Bearer sk-...',
'Instance': 'instance_shortId_or_id'
};
try {
const response = await axios.get('https://api.revong.com/api/v1/me/time', {headers});
console.log(response.data);
} catch (error) {
console.error('Error fetching time:', error);
}
};
fetchTime();
import requests
headers = {
'Authorization': 'Bearer sk-...',
'Instance': 'instance_shortId_or_id'
}
try:
response = requests.get('https://api.revong.com/api/v1/me/time', headers=headers)
response.raise_for_status()
print(response.json())
except requests.exceptions.RequestException as e:
print(f'Error fetching time: {e}')
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
client := &http.Client{}
req, err := http.NewRequest("GET", "https://api.revong.com/api/v1/me/time", nil)
if err != nil {
fmt.Println("Error creating request:", err)
return
}
req.Header.Add("Authorization", "Bearer sk-...")
req.Header.Add("Instance", "instance_shortId_or_id")
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error sending request:", err)
return
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println("Error reading response:", err)
return
}
fmt.Println(string(body))
}
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class FetchTime {
public static void main(String[] args) {
try {
URL url = new URL("https://api.revong.com/api/v1/me/time");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer sk-...");
connection.setRequestProperty("Instance", "instance_shortId_or_id");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
connection.disconnect();
System.out.println(content.toString());
} catch (Exception e) {
e.printStackTrace();
System.out.println("Error fetching time.");
}
}
}
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer sk-...");
client.DefaultRequestHeaders.Add("Instance", "instance_shortId_or_id");
try
{
var response = await client.GetAsync("https://api.revong.com/api/v1/me/time");
response.EnsureSuccessStatusCode();
var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
}
catch (HttpRequestException e)
{
Console.WriteLine("Error fetching time: " + e.Message);
}
}
}
Query parameter- optionally you can use query parameters (but we don’t recommend it).
curl "https://api.revong.com/api/v1/me/time?token=sk-...&instance=instance_shortId_or_id"
const axios = require('axios');
const fetchTime = async () => {
const url = 'https://api.revong.com/api/v1/me/time';
const params = {
token: 'sk-...',
instance: 'instance_shortId_or_id'
};
try {
const response = await axios.get(url, {params});
console.log(response.data);
} catch (error) {
console.error('Error fetching time:', error);
}
};
fetchTime();
import requests
params = {
'token': 'Bearer sk-...',
'instance': 'instance_shortId_or_id'
}
try:
response = requests.get('https://api.revong.com/api/v1/me/time', params=params)
response.raise_for_status()
print(response.json())
except requests.exceptions.RequestException as e:
print(f'Error fetching time: {e}')
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
client := &http.Client{}
url := "https://api.revong.com/api/v1/me/time?token=sk-...&instance=instance_shortId_or_id"
req, err := http.NewRequest("GET", url, nil)
if err != nil {
fmt.Println("Error creating request:", err)
return
}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error sending request:", err)
return
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println("Error reading response:", err)
return
}
fmt.Println(string(body))
}
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class FetchTime {
public static void main(String[] args) {
try {
URL url = new URL("https://api.revong.com/api/v1/me/time?token=sk-...&instance=instance_shortId_or_id");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
connection.disconnect();
System.out.println(content.toString());
} catch (Exception e) {
e.printStackTrace();
System.out.println("Error fetching time.");
}
}
}
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
var client = new HttpClient();
string url = "https://api.revong.com/api/v1/me/time?token=sk-...&instance=instance_shortId_or_id";
try
{
var response = await client.GetAsync(url);
response.EnsureSuccessStatusCode();
var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
}
catch (HttpRequestException e)
{
Console.WriteLine("Error fetching time: " + e.Message);
}
}
}

