Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Latest commit

 

History

History
98 lines (77 loc) · 2.69 KB

WebhooksApi.md

File metadata and controls

98 lines (77 loc) · 2.69 KB

Org.OpenAPITools.Api.WebhooksApi

All URIs are relative to https://api.getlago.com/api/v1

Method HTTP request Description
FetchPublicKey GET /webhooks/public_key Fetch webhook public key

FetchPublicKey

string FetchPublicKey ()

Fetch webhook public key

Webhook public key

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class FetchPublicKeyExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.getlago.com/api/v1";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new WebhooksApi(config);

            try
            {
                // Fetch webhook public key
                string result = apiInstance.FetchPublicKey();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhooksApi.FetchPublicKey: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the FetchPublicKeyWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Fetch webhook public key
    ApiResponse<string> response = apiInstance.FetchPublicKeyWithHttpInfo();
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling WebhooksApi.FetchPublicKeyWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

This endpoint does not need any parameter.

Return type

string

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json

HTTP response details

Status code Description Response headers
200 Successful response -
401 Unauthorized error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]