sage-one

Sage One API - unsupported_grant_type

筅森魡賤 提交于 2019-12-06 04:32:31
问题 I am trying to obtain an access token for Sage One API by following the docs using Guzzle(v6) / Laravel 5.2 (Laravel's involvement is irrelevant for this question), it is stuck at the "request access token" stage. The error Client error: `POST https://api.sageone.com/oauth2/token` resulted in a `400 Bad Request` response: {"error":"unsupported_grant_type"} The offending code $client = new Client([ 'base_uri'=>'https://api.sageone.com', 'headers' => ['content_type' => 'application/x-www-form

Sage One API - unsupported_grant_type

落花浮王杯 提交于 2019-12-04 12:37:35
I am trying to obtain an access token for Sage One API by following the docs using Guzzle (v6) / Laravel 5.2 (Laravel's involvement is irrelevant for this question), it is stuck at the "request access token" stage. The error Client error: `POST https://api.sageone.com/oauth2/token` resulted in a `400 Bad Request` response: {"error":"unsupported_grant_type"} The offending code $client = new Client([ 'base_uri'=>'https://api.sageone.com', 'headers' => ['content_type' => 'application/x-www-form-urlencoded'] ]); $data = [ 'client_id' => getenv('SAGE_CLIENT'), 'client_secret' => getenv('SAGE_SECRET