List connections
using RestSharp;
var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/connections");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.{id}.gr4vy.app/connections"
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.sandbox.{id}.gr4vy.app/connections")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.{id}.gr4vy.app/connections",
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;
}import requests
url = "https://api.sandbox.{id}.gr4vy.app/connections"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.{id}.gr4vy.app/connections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.sandbox.{id}.gr4vy.app/connections \
--header 'Authorization: Bearer <token>'{
"items": [
{
"id": "7b5e02bd-fa53-4ef0-b11e-1609d0f48cc5",
"type": "connection",
"name": "My Connection",
"active": true,
"silent": false,
"definition": {
"id": "stripe-card",
"type": "connection-definition",
"name": "Stripe",
"count": 1,
"group": "payment-service",
"category": "card",
"icon_url": "https://cdn.gr4vy.app/stripe.svg",
"provider": "Stripe"
}
}
]
}{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "No valid API authentication found",
"details": []
}List connections
Returns a list of all configured connections.
GET
/
connections
List connections
using RestSharp;
var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/connections");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.{id}.gr4vy.app/connections"
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.sandbox.{id}.gr4vy.app/connections")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.{id}.gr4vy.app/connections",
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;
}import requests
url = "https://api.sandbox.{id}.gr4vy.app/connections"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.{id}.gr4vy.app/connections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.sandbox.{id}.gr4vy.app/connections \
--header 'Authorization: Bearer <token>'{
"items": [
{
"id": "7b5e02bd-fa53-4ef0-b11e-1609d0f48cc5",
"type": "connection",
"name": "My Connection",
"active": true,
"silent": false,
"definition": {
"id": "stripe-card",
"type": "connection-definition",
"name": "Stripe",
"count": 1,
"group": "payment-service",
"category": "card",
"icon_url": "https://cdn.gr4vy.app/stripe.svg",
"provider": "Stripe"
}
}
]
}{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "No valid API authentication found",
"details": []
}This API is different from the list payment services endpoint because
it returns all service types including anti-fraud and gift card services.
This endpoint requires the
connections.read scope.⌘I