Reputation: 11
I am making a module that allows users to login with their google account. I want them to be able to link from my system to their Google Calendar. I am currently logged in, but cannot get permission to view their calendar. Activation permission is enabled in the app
And it got an error and got the message
{ "error": { "code": 403, "message": "Request had insufficient authentication scopes.", "errors": [ { "message": "Insufficient Permission", "domain": "global", "reason": "insufficientPermissions" } ], "status": "PERMISSION_DENIED" } }
Can you guys help me, thanks a lot
Upvotes: 1
Views: 2712
Reputation: 117146
Request had insufficient authentication scopes.
Means that the user who you are authencation with has consented to your application accessing their data but not at the level you need for the method you are running.
Since you haven't included any code. Lets say that you have followed the tutorial which has you request read only scope
$client->setScopes(Google_Service_Calendar::CALENDAR_READONLY);
Then you change the code to use the Calendar.inser method. This method requires write access as can be seen in the documentation.
So with the user having only consented to read only access you don't have permission to write to the calendar and you will get the insufficient authentication scopes
error message.
Solution is to check your code, then check the documentation and ensure you are requesting the proper scopes.
Upvotes: 0