Sudhanshu Jain
Sudhanshu Jain

Reputation: 41

Multiple scope urls oauth

I want to get user's email address and user contacts through Google OAuth. I have the respective SCOPE urls for both APIs. But how to pass them in one go?

Upvotes: 0

Views: 3183

Answers (1)

Mr. Leshem
Mr. Leshem

Reputation: 113

If you are doing it programmatically , in the examples I saw ,usually you should pass an array of strings where each string represents one scope. If you are doing it via HTTP GET/POST request - just concatenate your scopes with a "+" sign. like:

https://accounts.google.com/o/oauth2/v2/auth?&scope=https://www.googleapis.com/auth/userinfo.email+https://www.googleapis.com/auth/userinfo.profile

Upvotes: 4

Related Questions