Hi Mael - thank you very much for the response. Using the linked github repo I am now able to get an access_token and refresh_token.
The next step is to actually query the Bkper API but I'm getting a 401 error with the message: "401 Method doesn't allow callers without established identity. Please use an API key or other form of API consumer identity to call this API.". I get the same error when trying to use the API Explorer. I've done a few iterations, but I'm currently creating a request like this:
$filter = "group:'Current Assets' after:01/2023 before:07/2024";
$path = "
https://bkper-hrd.appspot.com/_ah/api/bkper/v5/books/[book id redacted]/balances";
$request = Http::get($path, [
'headers' => [
'Authorization' => 'Bearer [access token retrieved via oauth redacted]'
],
'query' => [
'query' => $filter,
'key' => '[key via google dashboard]',
],
]);
$response = $request->body();