This error may indicate an internal problem in the backend as well as a problem in the input data that cannot be specified in detail. Check that all data is correct and try again, otherwise please contact us at [email protected].
This error indicates that the token was expired and need to login again.
This error indicates that the user is not allowed to access this resource.
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace Example
{
class Program
{
static async Task Main(string[] args)
{
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "[API_URL]/rpt_geogence");
request.Headers.Add("tenant", "logicsat");
request.Headers.Add("Authorization", "Bearer {your_token}");
request.Headers.Add("Content-Type", "application/json");
var json = "{\"pagination\":{\"limit\":1,\"offset\":0},\"devices\":[],\"geofences\":[],\"idletime\":null,\"startdate\":\"2024-06-20\",\"enddate\":\"2024-06-22\"}";
request.Content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
}
}