post
https://accounts.rydoo.com/connect/token
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Token expirationNote that authorization token expires every 5 minutes. In real applications you want token to be obtained programatically.
var httpClient = new HttpClient();
httpClient.BaseAddress = new Uri("https://accounts.rydoo.com");
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes($"{clientId}:{clientSecret}");));
var requestContent = new List<KeyValuePair<string, string>>
{
new KeyValuePair<string, string>("grant_type", "client_credentials"),
new KeyValuePair<string, string>("scope", "company structure:read structure:write expenses:read expenses:write fields:read fields:write users:read users:write"),
};
var response = await httpClient.PostAsync("connect/token", new FormUrlEncodedContent(requestContent));