curl --request GET \
--url https://api.goyappr.com/tool-connections/{id}/options/{resource} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/tool-connections/{id}/options/{resource}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goyappr.com/tool-connections/{id}/options/{resource}', 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/{id}/options/{resource}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/{id}/options/{resource}"
req, _ := http.NewRequest("GET", 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.get("https://api.goyappr.com/tool-connections/{id}/options/{resource}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/tool-connections/{id}/options/{resource}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"resource": "calendars",
"data": [
{
"value": "primary",
"label": "Front desk",
"primary": true,
"detail": "owner"
},
{
"value": "c_1a2b3c@group.calendar.google.com",
"label": "Clinic",
"primary": false,
"detail": "writer"
}
]
}{
"resource": "calendars",
"data": [],
"status": "loading",
"retry_after": 4,
"message": "The calendars are still loading from the account. Ask again in a few seconds; the same listing answers."
}{
"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>"
}
]
}{
"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>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}List an account's choices for an input
curl --request GET \
--url https://api.goyappr.com/tool-connections/{id}/options/{resource} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/tool-connections/{id}/options/{resource}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goyappr.com/tool-connections/{id}/options/{resource}', 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/{id}/options/{resource}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/{id}/options/{resource}"
req, _ := http.NewRequest("GET", 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.get("https://api.goyappr.com/tool-connections/{id}/options/{resource}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/tool-connections/{id}/options/{resource}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"resource": "calendars",
"data": [
{
"value": "primary",
"label": "Front desk",
"primary": true,
"detail": "owner"
},
{
"value": "c_1a2b3c@group.calendar.google.com",
"label": "Clinic",
"primary": false,
"detail": "writer"
}
]
}{
"resource": "calendars",
"data": [],
"status": "loading",
"retry_after": 4,
"message": "The calendars are still loading from the account. Ask again in a few seconds; the same listing answers."
}{
"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>"
}
]
}{
"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>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}tool-connections:read. The values an action input can be fixed to on a connected account, so you pick one instead of typing its id. Today the one resource is calendars: the calendars of a Google Calendar account that the account can write to, the main one first with the value primary.
curl https://api.goyappr.com/tool-connections/CONNECTION_ID/options/calendars \
-H "Authorization: Bearer YOUR_API_KEY"
{
"resource": "calendars",
"data": [
{ "value": "primary", "label": "Front desk", "primary": true, "detail": "owner" },
{ "value": "c_1a2b3c@group.calendar.google.com", "label": "Clinic", "primary": false, "detail": "writer" }
]
}
{"kind": "literal", "value": ["c_1a2b3c@group.calendar.google.com"]} for find free time’s items, the id as text for calendar_id - or offer several as a list the agent chooses from by name. See setting inputs.
The list is read live from the account through its own “List calendars” action, a read with no effect, made ready on the first call (an API key doing that also needs tools:create, and tools:update to run it).
A listing waits up to about ten seconds. When the account is still answering then, the answer is 202 with Retry-After and the listing goes on; ask again after that many seconds and the same listing answers:
{ "resource": "calendars", "data": [], "status": "loading", "retry_after": 4, "message": "The calendars are still loading from the account. Ask again in a few seconds; the same listing answers." }
404 TOOL_CONNECTION_NOT_FOUND, 409 TOOL_CONNECTION_NOT_READY or 409 RESOURCE_OPTIONS_RECONNECT_REQUIRED (Google refused the account’s read, so its sign-in expired or lost access: reconnect it with POST /tool-connections/{id}/reconnect), 422 RESOURCE_UNSUPPORTED (another resource, or an account that is not Google Calendar), 429 RESOURCE_OPTIONS_BUSY (too many tests running in the workspace; Retry-After), 400 TOOL_CONNECTIONS_QUERY_INVALID (a query parameter). 503 RESOURCE_OPTIONS_PROVIDER_UNAVAILABLE means Google Calendar did not answer usefully three times (Retry-After: 30); 503 RESOURCE_OPTIONS_UNAVAILABLE means the listing failed on our side. In every case you can type the calendar ID instead.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).