asimlqt / php-google-spreadsheet-client

A PHP library for accessing and manipulating Google Spreadsheets
Other
543 stars 154 forks source link

# Bug fix: UnauthorizedException (Token invalid) #87

Closed pvhau closed 8 years ago

pvhau commented 9 years ago

Updated parameters based on the Google API PHP library. With this change work correctly the examples mentioned in the README file.

pvhau commented 9 years ago

follow google API OAuth v2.0 token_type must be Bearer.

asimlqt commented 8 years ago

I used to use Bearer as the token type but if I remember correctly someone sent a PR for this, can't remember what the reason was.

In any case you can set it to Bearer by setting the second parameter. Also not sure why you're doing the whole json_decode business, that will break every single users application!