I'm using the ruby google-api-client gem. I'm able to successfully OAuth and get back a access token. For the life of me, now that I have the token, I can't figure out how to get the basic profile info for the user.
My scope includes https://www.googleapis.com/auth/userinfo.email. How do I get this info from the client, or what google client library should I pull in to get this info?
Any help appreciated...this seems like a really simple request, yet I can't find it anywhere.
require 'google/apis/oauth2_v2'
service = Google::Apis::Oauth2V2::Oauth2Service.new
service.tokeninfo(access_token: "Your Access Token").email
Source code here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With