GET api/v1/webhooks

This endpoint allows you to retrieve a list of webhooks.

This endpoint does not require a request body.

Sample code

C#
Java
NodeJS
PHP
Python
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "http://api.locate2u.com/api/v1/webhooks");
request.Headers.Add("Authorization", "Bearer yourBearerTokenHere");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("http://api.locate2u.com/api/v1/webhooks")
  .method("GET", body)
  .addHeader("Authorization", "Bearer yourBearerTokenHere")
  .build();
Response response = client.newCall(request).execute();
var http = require('follow-redirects').http;
var fs = require('fs');

var options = {
  'method': 'GET',
  'hostname': 'api.locate2u.com',
  'path': '/api/v1/webhooks',
  'headers': {
    'Authorization': 'Bearer yourBearerTokenHere'
  },
  'maxRedirects': 20
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

req.end();
 'http://api.locate2u.com/api/v1/webhooks',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer yourBearerTokenHere'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "http://api.locate2u.com/api/v1/webhooks"

payload = {}
headers = {
  'Authorization': 'Bearer yourBearerTokenHere'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Response

The response will include an array of webhook objects, each containing details event type and URL.
Example response :

[
    {
        "eventType": "note.created",
        "url": "https://mySite/7689211c-3ef4-4ac4-a24d-8047cc0f1be5"
    },
    {
        "eventType": "stop-rating.created",
        "url": "https://mySite.in/eK1QaMRYnZulaRPldWa9"
    }
]