curl --request POST \
--url https://api.goyappr.com/tool-connections/attempts/{id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/tool-connections/attempts/{id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goyappr.com/tool-connections/attempts/{id}/cancel', 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://api.goyappr.com/tool-connections/attempts/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.goyappr.com/tool-connections/attempts/{id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.goyappr.com/tool-connections/attempts/{id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/tool-connections/attempts/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"attempt": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending_human",
"expires_at": "2023-11-07T05:31:56Z",
"next_poll_at": "2023-11-07T05:31:56Z",
"error_code": "<string>",
"return_path": "/en/tools"
}
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}Cancel an authorization attempt
Requires tool-connections:manage. Closes an authorization nobody finished, which frees the slot this API key holds against the ten-open limit. The connection record itself stays and nothing is revoked at the provider - an attempt cancelled before consent never produced a grant. Already cancelled, completed, failed and expired attempts answer 200 unchanged, so a retry is safe.
curl --request POST \
--url https://api.goyappr.com/tool-connections/attempts/{id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/tool-connections/attempts/{id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goyappr.com/tool-connections/attempts/{id}/cancel', 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://api.goyappr.com/tool-connections/attempts/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.goyappr.com/tool-connections/attempts/{id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.goyappr.com/tool-connections/attempts/{id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/tool-connections/attempts/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"attempt": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending_human",
"expires_at": "2023-11-07T05:31:56Z",
"next_poll_at": "2023-11-07T05:31:56Z",
"error_code": "<string>",
"return_path": "/en/tools"
}
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}tool-connections:manage. Use the exact attempt.id that connection creation or replacement returned — not the connection id.
curl -X POST https://api.goyappr.com/tool-connections/attempts/ATTEMPT_ID/cancel \
-H "Authorization: Bearer YOUR_API_KEY"
429 CONNECTION_RATE_LIMIT on the next POST /tool-connections; an attempt you leave alone frees its own slot when it expires, ten minutes after it was created.
Already cancelled, completed, failed and expired attempts answer 200 with the attempt unchanged, so a retry is safe and so is cancelling an attempt you are no longer sure about.
What it does not do
| The connection record | Stays, still waiting for an authorization that will never come. Cancelling does not delete it. POST /tool-connections/cleanup clears every attempt nobody finished in one request; for this one record, DELETE /tool-connections/{id} moves it to disconnected and POST /tool-connections/{id}/remove then takes it off the list. Left alone, it leaves the list by itself a day after it started. |
| The provider grant | Untouched. An attempt that was cancelled before consent never produced one; if consent did complete, use DELETE /tool-connections/{id} and then revoke Yappr’s access in the provider’s own account settings. |
| Other people’s attempts | Untouched. This cancels the one attempt you name, and only if it belongs to your workspace. |
Authorizations
Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys. No key is 401 MISSING_KEY; a key that is not one of ours, or is revoked, is 401 INVALID_KEY; an expired one is 401 EXPIRED_KEY. A valid key without the scope an operation needs is 403 INSUFFICIENT_SCOPE on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's RATE_LIMIT asks for what is left of the minute, a route's daily cap (RATE_LIMITED) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is 404 ROUTE_NOT_FOUND, and a method a served path does not take is 405 METHOD_NOT_ALLOWED with an Allow header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (POST /calls/ is POST /calls) and refused where it can (GET /calls/). A doubled slash inside a path is merged into one before the request reaches the API (GET //calls is GET /calls).