My Business
2K members online now
2K members online now
For developers who are using the Google My Business API to manage locations
Guide Me
star_border
Reply

adding multiple scopes

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

We have an application that requests for multiple scopes today.

 

As soon as I added the new scope of “https://www.googleapis.com/auth/plus.business.manage”, things started failing.

 

these are the scopes that we're requesting (last one is the business.manage scope)

https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo#email https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/plus.profiles.write https://www.googleapis.com/auth/plus.pages.manage https://www.googleapis.com/auth/plus.stream.read https://www.googleapis.com/auth/plus.stream.write https://www.googleapis.com/auth/plus.circles.read https://www.googleapis.com/auth/plus.circles.write https://www.googleapis.com/auth/plus.media.readwrite https://www.googleapis.com/auth/plus.business.manage

 

the new access token that we received after user consent is unable to get data from Google API. New access token works only for My Business API.

 

GET request for "https://www.googleapis.com/plus/v1/people/me" resulted in 403 (Forbidden)

 

 

Spoiler

"error": {

  "errors": [

   {

    "domain": "global",

    "reason": "forbidden",

    "message": "Forbidden"

   }

  ],

  "code": 403,

  "message": "Forbidden"

}

}

We are seeing this error after adding this new scope https://www.googleapis.com/auth/plus.business.manage

 

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Jayesh G
October 2016

Re: adding multiple scopes

Google Employee
# 2
Google Employee

Hi @Jayesh G,

 

The scope variable parameter controls the set of resources and operations that an OAuth 2.0 access token permits. During the access-token request, your application can send one or more values in the scope parameter. I can’t give you a fine-grained analysis for why you received the 403 Forbidden error since you didn’t provide your source code. However, please make sure that you don’t have a syntax error for multiple values in the scope parameter including the following OAuth 2.0 scope value for the Google My Business API when requesting user consent:

https://www.googleapis.com/auth/plus.business.manage

 

It is generally a best practice that you should request scopes incrementally, at the time access is required, rather than up front.

 

Thanks,

Terry

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Jayesh G
October 2016

Re: adding multiple scopes

Google Employee
# 2
Google Employee

Hi @Jayesh G,

 

The scope variable parameter controls the set of resources and operations that an OAuth 2.0 access token permits. During the access-token request, your application can send one or more values in the scope parameter. I can’t give you a fine-grained analysis for why you received the 403 Forbidden error since you didn’t provide your source code. However, please make sure that you don’t have a syntax error for multiple values in the scope parameter including the following OAuth 2.0 scope value for the Google My Business API when requesting user consent:

https://www.googleapis.com/auth/plus.business.manage

 

It is generally a best practice that you should request scopes incrementally, at the time access is required, rather than up front.

 

Thanks,

Terry