cURL
curl --request POST \
--url https://api.eka.care/connect-auth/v1/account/refresh-token \
--header 'Authorization: <authorization>' \
--header 'Client-Id: <client-id>' \
--header 'Content-Type: application/json' \
--data '
{
"refresh_token": "<string>",
"access_token": "<string>"
}
'import requests
url = "https://api.eka.care/connect-auth/v1/account/refresh-token"
payload = {
"refresh_token": "<string>",
"access_token": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Client-Id": "<client-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
'Client-Id': '<client-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({refresh_token: '<string>', access_token: '<string>'})
};
fetch('https://api.eka.care/connect-auth/v1/account/refresh-token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/connect-auth/v1/account/refresh-token")
.header("Authorization", "<authorization>")
.header("Client-Id", "<client-id>")
.header("Content-Type", "application/json")
.body("{\n \"refresh_token\": \"<string>\",\n \"access_token\": \"<string>\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/connect-auth/v1/account/refresh-token");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<authorization>");
request.AddHeader("Client-Id", "<client-id>");
request.AddJsonBody("{\n \"refresh_token\": \"<string>\",\n \"access_token\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/connect-auth/v1/account/refresh-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Client-Id"] = '<client-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"refresh_token\": \"<string>\",\n \"access_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"access_token": "<string>",
"expires_in": 123,
"refresh_expires_in": 123,
"refresh_token": "<string>"
}{
"code": 123,
"error": "<string>"
}{
"code": 123,
"error": "<string>"
}APIs
Connect Refresh
Get new Authorization token using the refresh token
POST
/
connect-auth
/
v1
/
account
/
refresh-token
cURL
curl --request POST \
--url https://api.eka.care/connect-auth/v1/account/refresh-token \
--header 'Authorization: <authorization>' \
--header 'Client-Id: <client-id>' \
--header 'Content-Type: application/json' \
--data '
{
"refresh_token": "<string>",
"access_token": "<string>"
}
'import requests
url = "https://api.eka.care/connect-auth/v1/account/refresh-token"
payload = {
"refresh_token": "<string>",
"access_token": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Client-Id": "<client-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
'Client-Id': '<client-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({refresh_token: '<string>', access_token: '<string>'})
};
fetch('https://api.eka.care/connect-auth/v1/account/refresh-token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/connect-auth/v1/account/refresh-token")
.header("Authorization", "<authorization>")
.header("Client-Id", "<client-id>")
.header("Content-Type", "application/json")
.body("{\n \"refresh_token\": \"<string>\",\n \"access_token\": \"<string>\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/connect-auth/v1/account/refresh-token");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<authorization>");
request.AddHeader("Client-Id", "<client-id>");
request.AddJsonBody("{\n \"refresh_token\": \"<string>\",\n \"access_token\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/connect-auth/v1/account/refresh-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Client-Id"] = '<client-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"refresh_token\": \"<string>\",\n \"access_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"access_token": "<string>",
"expires_in": 123,
"refresh_expires_in": 123,
"refresh_token": "<string>"
}{
"code": 123,
"error": "<string>"
}{
"code": 123,
"error": "<string>"
}Headers
Example:
"Bearer <access_token>"
Example:
"<EC_00XYZ>"
Was this page helpful?

