curl --request GET \
--url https://sandbox.circularo.com/api/v1/oauth/{strategy_name}/callbackimport requests
url = "https://sandbox.circularo.com/api/v1/oauth/{strategy_name}/callback"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/oauth/{strategy_name}/callback', 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://sandbox.circularo.com/api/v1/oauth/{strategy_name}/callback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.circularo.com/api/v1/oauth/{strategy_name}/callback"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.circularo.com/api/v1/oauth/{strategy_name}/callback")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/oauth/{strategy_name}/callback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Finish an OAuth flow
GET /oauth/{strategy_name}/callback
The address identity providers are given when a flow is started with GET /oauth/{strategy_name}, and the one the person’s browser is sent back to once they have answered. It is reached by that redirect, never called by a client on its own, and it always answers with another redirect rather than a body.
Where the browser ends up depends on what the flow was started for. An ordinary sign-in leaves the session token in a cookie and lands in the web application; a flow that named a callback address of its own leaves a one-time code there instead, to be exchanged through GET /oauth/code. A recipient proving who they are lands back on the shared document with a one-time token for it. An identity that matches no account here is sent to the linking page, where the person can attach it to an account. A flow the provider ended, or one that failed on our side, is sent back to the page it started from with the reason in an err parameter.
The flow is recognised by state alone, and it is used up here: the same answer cannot be delivered twice, an answer that arrives more than five minutes late is refused, and so is one that reaches a different browser than the one the flow started in.
No authorization: No authorization is required to call this endpoint.
curl --request GET \
--url https://sandbox.circularo.com/api/v1/oauth/{strategy_name}/callbackimport requests
url = "https://sandbox.circularo.com/api/v1/oauth/{strategy_name}/callback"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/oauth/{strategy_name}/callback', 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://sandbox.circularo.com/api/v1/oauth/{strategy_name}/callback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.circularo.com/api/v1/oauth/{strategy_name}/callback"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.circularo.com/api/v1/oauth/{strategy_name}/callback")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/oauth/{strategy_name}/callback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Path Parameters
Query Parameters
Handle of the flow, handed to the provider when it was started and returned unchanged. Everything the flow needs is kept under it on the server; it is good for five minutes and for a single use, and it is tied to the browser the flow started in.
"3f2504e04f8911d39a0c0305e82c3301"
Response
The flow is finished and the browser is redirected onwards - into the web application, to the client's own callback address, or back to where it started with an err parameter when it did not work out.