curl --request GET \
--url https://use.hoop.dev/api/mcp-oauth/token/{flowID}import requests
url = "https://use.hoop.dev/api/mcp-oauth/token/{flowID}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://use.hoop.dev/api/mcp-oauth/token/{flowID}', 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://use.hoop.dev/api/mcp-oauth/token/{flowID}",
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://use.hoop.dev/api/mcp-oauth/token/{flowID}"
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://use.hoop.dev/api/mcp-oauth/token/{flowID}")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/mcp-oauth/token/{flowID}")
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{
"access_token": "<string>",
"authorization_header": "Bearer eyJ...",
"client_id": "<string>",
"expires_in": 3600,
"refresh_token": "<string>",
"server_url": "https://mcp.figma.com/mcp",
"token_type": "Bearer"
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}Retrieve the token obtained by an MCP OAuth login
Returns the access token obtained by a completed MCP OAuth login so the connection create page can freeze it into the connection’s HEADER_AUTHORIZATION configuration. The token is returned at most once: the flow row is deleted on read.
curl --request GET \
--url https://use.hoop.dev/api/mcp-oauth/token/{flowID}import requests
url = "https://use.hoop.dev/api/mcp-oauth/token/{flowID}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://use.hoop.dev/api/mcp-oauth/token/{flowID}', 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://use.hoop.dev/api/mcp-oauth/token/{flowID}",
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://use.hoop.dev/api/mcp-oauth/token/{flowID}"
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://use.hoop.dev/api/mcp-oauth/token/{flowID}")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/mcp-oauth/token/{flowID}")
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{
"access_token": "<string>",
"authorization_header": "Bearer eyJ...",
"client_id": "<string>",
"expires_in": 3600,
"refresh_token": "<string>",
"server_url": "https://mcp.figma.com/mcp",
"token_type": "Bearer"
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}Path Parameters
The flow id returned by the authorize endpoint
Response
OK
AccessToken is the OAuth access token.
AuthorizationHeader is the full " " value to set as HEADER_AUTHORIZATION on the connection.
"Bearer eyJ..."
ClientID is the OAuth client id used (relevant when registered dynamically).
ExpiresIn is the access token lifetime in seconds, when known.
3600
RefreshToken is the OAuth refresh token, when the provider returned one.
ServerURL echoes the authorized MCP endpoint.
"https://mcp.figma.com/mcp"
TokenType is the OAuth token type (typically "Bearer").
"Bearer"
Was this page helpful?