How can i get the "userId" of google account to impact with their api? - google-api

i can't find out my userId of gmail account to use Gmail API.
So someone can find. Can you tell me?

userId string The user's email address. The special value me can be used to indicate the authenticated user.
The user id / email can be found from the current authenticated user. When the user logs in you have access to some information about them. You can always use me if you are requesting information about the current user.
Example
GET https://www.googleapis.com/gmail/v1/users/me/profile
How to find userid / email of the current user
With the gmail api you can use getprofile to get some basic information about the user who is currently logged in.
{
"emailAddress": "xxx#gmail.com",
"messagesTotal": 66327,
"threadsTotal": 13902,
"historyId": "4599500"
}
Using this method you can find the users actual email address if you wish to use that instead of using me.

Your user Id is your email address, or whatever you use in the user id field when using a Google login form.

Related

How to get userId for Google Fit API?

How to get userId for getting the activity data of the user from google fit API.
GET https://www.googleapis.com/fitness/v1/users/userId/dataSources/dataSourceId
I can able to get my data by replacing userId with me but I want to create an application for other users.
As stated in the documentation, the only supported value for the user id is "me".
The identity of the user that "me" refers to is conveyed by the OAuth token you pass with your request.
If you want to access the data for a user, they will need to grant an OAuth token to you.

How do I get the Google user ID from an email address?

I want to display the GMail avatar of the user in my app. I can easily get the image URL, using the Google People API. But this API expects a user ID.
Which other Google API can I use to pass in an email address, and get back the user ID?
The Google people api is technically hooked up to Google Contacts. So if you authenticate your user and they have added themselves with a picture you will see it that way.
The Google+ api will work the same way you authenticate the user and if they have added a picture you will be able to see it.
Which other Google API can I use to pass in an email address, and get back the user ID?
NONE. There is no way Google or any other company is going to give you an api that is going to let you search on peoples email addresses and return a picture or any information about said person you may want to consult GDRP
Email address is private user information and is only accessible by being authenticated.

How to create a stormpath user without email?

Some users of my application do not have an email. I want them to register under a tenant. I couldn't find a way to make email field as non-mandatory while registration. The basic requirement of a stormpath account is an email and password.
Stormpath currently always requires a user's email AND password to create an account. In the future, we plan to remove this limitation.
For now, the only way to get around this is to fill in a dummy email address. Sorry!

How to get user email address using pinterest authentication api?

i am using pinterest api to register a user on my website. i get user id, first name, last name and url. but email is not given in the response. how can is there any api to get email of pinterest user?
You cant get email address of Authenticated user via API. Pintrest do not provide that detail through API.

TweetSharp - Get User Email ID after login

I am using TweetSharp for user login in my asp.net mvc web app. All works fine but after login I need to save the user data in my DB as well. I cant find email from TwitterUser object after loging. How can i get user's email once the user is authenticated?
thanks
You cannot. The Twitter API doesn't return email addresses for users.
Take a look at the users/show documentation to see all the information you can retrieve.
If your app is whitelisted, you can now retrieve the email as part of verify_credentials https://dev.twitter.com/rest/reference/get/account/verify_credentials

Resources