Skip to docs content

REST API with C#

RestClient is a simple class found in dot net api to make http calls. Its fairly simple and easy to use. You can find more about this class here

Using RestClient

Tip:

Always remember to replace API_SECRET in the Bearer Token and project-id in the URL with the correct values from the Apito console.
If you are unsure where to find your API secrets and endpoints for your project, visit this page.

var client = new RestClient("https://api.apito.io/secured/rest/project-id");
var request = new RestRequest(Method.GET);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer API_SECRETS");
IRestResponse response = client.Execute(request);