curl --request POST \
--url https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/auth/refresh-token \
--header 'Content-Type: application/json' \
--data '
{
"refresh_token": "d1a3e281-96b6-4f77-a587-7b6c8c2a96d9"
}
'import requests
url = "https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/auth/refresh-token"
payload = { "refresh_token": "d1a3e281-96b6-4f77-a587-7b6c8c2a96d9" }
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({refresh_token: 'd1a3e281-96b6-4f77-a587-7b6c8c2a96d9'})
};
fetch('https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/auth/refresh-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://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/auth/refresh-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([
'refresh_token' => 'd1a3e281-96b6-4f77-a587-7b6c8c2a96d9'
]),
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://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/auth/refresh-token"
payload := strings.NewReader("{\n \"refresh_token\": \"d1a3e281-96b6-4f77-a587-7b6c8c2a96d9\"\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://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/auth/refresh-token")
.header("Content-Type", "application/json")
.body("{\n \"refresh_token\": \"d1a3e281-96b6-4f77-a587-7b6c8c2a96d9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/auth/refresh-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 \"refresh_token\": \"d1a3e281-96b6-4f77-a587-7b6c8c2a96d9\"\n}"
response = http.request(request)
puts response.read_body{
"auth_id": "674d0bf5c28b69001f8e03a1",
"created_at": "2024-04-22T10:00:00Z",
"updated_at": "2024-04-22T10:00:00Z",
"access_token": "fa0b97b2-445f-41d2-b50f-fb3b014a301e",
"expires_at": "2024-04-22T10:00:00Z",
"refresh_token": "d1a3e281-96b6-4f77-a587-7b6c8c2a96d9",
"token_type": "Bearer",
"user_name": "john_doe"
}{
"title": "Human-readable error title.",
"detail": "Human-readable error details."
}{
"title": "Human-readable error title.",
"detail": "Human-readable error details."
}Refresh expired access token
Refresh an expired access token.
Use the refresh_token property and value received from the /auth/token request to obtain a new access token when needed.
curl --request POST \
--url https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/auth/refresh-token \
--header 'Content-Type: application/json' \
--data '
{
"refresh_token": "d1a3e281-96b6-4f77-a587-7b6c8c2a96d9"
}
'import requests
url = "https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/auth/refresh-token"
payload = { "refresh_token": "d1a3e281-96b6-4f77-a587-7b6c8c2a96d9" }
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({refresh_token: 'd1a3e281-96b6-4f77-a587-7b6c8c2a96d9'})
};
fetch('https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/auth/refresh-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://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/auth/refresh-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([
'refresh_token' => 'd1a3e281-96b6-4f77-a587-7b6c8c2a96d9'
]),
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://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/auth/refresh-token"
payload := strings.NewReader("{\n \"refresh_token\": \"d1a3e281-96b6-4f77-a587-7b6c8c2a96d9\"\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://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/auth/refresh-token")
.header("Content-Type", "application/json")
.body("{\n \"refresh_token\": \"d1a3e281-96b6-4f77-a587-7b6c8c2a96d9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/auth/refresh-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 \"refresh_token\": \"d1a3e281-96b6-4f77-a587-7b6c8c2a96d9\"\n}"
response = http.request(request)
puts response.read_body{
"auth_id": "674d0bf5c28b69001f8e03a1",
"created_at": "2024-04-22T10:00:00Z",
"updated_at": "2024-04-22T10:00:00Z",
"access_token": "fa0b97b2-445f-41d2-b50f-fb3b014a301e",
"expires_at": "2024-04-22T10:00:00Z",
"refresh_token": "d1a3e281-96b6-4f77-a587-7b6c8c2a96d9",
"token_type": "Bearer",
"user_name": "john_doe"
}{
"title": "Human-readable error title.",
"detail": "Human-readable error details."
}{
"title": "Human-readable error title.",
"detail": "Human-readable error details."
}Body
The request body requires only the refresh_token property.
The alpha-numeric refresh token value, used to re-authenticate a user after the authentication token expires.
"d1a3e281-96b6-4f77-a587-7b6c8c2a96d9"
Response
Token successfully refreshed. The response body contains the newly created resource.
The response object returned for both /auth endpoints.
A unique alpha-numeric string generated by the system when creating a resource (e.g., dishes, ingredients, etc). Ids are required for retrieving the properties of a specific resource.
"674d0bf5c28b69001f8e03a1"
The date and time the resource was created. Timestamp uses ISO 8601 format, Ex: 2025-04-05T14:55:03.824Z
"2024-04-22T10:00:00Z"
The date and time the resource was last updated.
Timestamp uses ISO 8601 format, Ex: 2025-04-05T14:55:03.824Z
"2024-04-22T10:00:00Z"
An alpha-numeric string generated when authenicating a user and required for protected endpoints.
Expires after ### seconds.
"fa0b97b2-445f-41d2-b50f-fb3b014a301e"
Indicates when a token expires and should be refreshed to maintain a user's authentication. Timestamp uses ISO 8601 format, Ex: 2025-04-05T14:55:03.824Z
"2024-04-22T10:00:00Z"
The alpha-numeric refresh token value, used to re-authenticate a user after the authentication token expires.
"d1a3e281-96b6-4f77-a587-7b6c8c2a96d9"
The type of token used in an /auth request.
"Bearer"
The user name for account login purposes. User names cannot contain spaces.
"john_doe"