From f695294b45268276ce891bdc58140f4f674b81c5 Mon Sep 17 00:00:00 2001 From: German Lena Date: Thu, 16 Mar 2017 16:15:57 -0300 Subject: [PATCH] fix oauth token call --- src/API/Authentication.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/API/Authentication.php b/src/API/Authentication.php index 7dcb65c7..64727abe 100644 --- a/src/API/Authentication.php +++ b/src/API/Authentication.php @@ -262,6 +262,10 @@ public function oauth_token($options = []) { $options['client_id'] = $this->client_id; } + if (! isset($options['client_secret'])) { + $options['client_secret'] = $this->client_secret; + } + if (! isset($options['grant_type'])) { throw new ApiException('grant_type is mandatory'); }