Hello,I'm developing a PHP application. I have downloaded the sample files for making API calls from here: https://developer.columbus.sage.com/docs#/es/sageone/accounts/gs-sample-applicationsThe problem is that when I try accessing the URL generated via the authRedirect() function inside the SageoneClient class, I get this error:
Parameter 'client_id' is invalid.even though I literally copy-pasted the client id from the application details. Here's a snippet of the code:
$client_id = "copy-pasted client id"; .$client_secret = 'copy-pasted client secret';$callback_url = 'sage.mugu.ro/callback.php';$auth_endpoint = 'www.sageone.com/.../auth';$token_endpoint = 'https://api.sageone.com/oauth2/token';
$sageone_client = new SageoneClient($client_id, $client_secret, $callback_url, $auth_endpoint, $token_endpoint, $scope);
$redirect_url = $sageone_client->authRedirect();echo $redirect_url;How can I solve this problem?
it looks like you are using the auth endpoint of our deprecated APIs. Please make sure to always use https://www.sageone.com/oauth2/auth/central when authorizing API v3.1 clients.
Also, please use https://oauth.accounting.sage.com/token as your token endpoint.
Further information can be found here: