import contact to my website from gmail using access_token - google-contacts-api

I have access_token="#####"Client ID="#####"Client secret="##########"Project Number="#######"
Using Gmail contact API how to retrieve then contact list . I don't want to give credentials again . Because I already authorize the application and I don have "access_token" provided by google .
Also want to know in Class "RequestSettings" (google api) which one is Application name .
Please help.
I don't want to retrieve user contact list by providing User Id and Password .

Related

Project with Google APi with self user auth

I was able to create a project to connect an app to google data, for a specific account (followed Google People API)
But now I would like that each customer log in hisself to his account and manage his data.
I can' t create project in the Google API Console for each customer, my app needs to read auth from each user who will use my app and "auto" create auth to read google contact data of the logged user.
Is possible?
Could you suggest me articles about how to do?
It sounds like you are trying to do exactly what OAuth 2.0 (see the page you linked to) gives you: authenticating users. This differs from using an API key, which is only authorizing your project and has nothing to do with a user's credentials.
OAuth 2.0 combines a Client ID (associated with your Google Developers Console project) and a user's login (specific to the user who is accessing your app/site) to give you an authorization token. This token will let your app act on behalf of that user when calling that API. Just make sure to request the necessary scopes as part of the OAuth 2.0 authorization prompt given to the user.
How to give this prompt varies by environment, but many common options are listed on that link.
Note that you always use the same Client ID, so you only need one Google Developers Console project, but you are given a unique token specific to that user's login when they authorize your app, so this lets you act as any user which grants your app access to their account.

getting image url from google contact api

I am using google contacts api for getting my contacts information.
I am getting data through this url to generate feed and then parsing this feed to get the data.
I am able to get email and name of my contacts but unable to get image of my contact.
Can somebody please help me in this
Send a GET request with the userEmail and contactID. Assuming that the contact has a photo, you'll receive a link which you can use to access the photos. Keep in mind this requires authentication.

How can I change the display name of an API console Service user?

I am using an API Console type Service user to create and share files with users. The name of the Service user appears in the UI as a long, unintelligible string. How can I change it please?
It's not possible to edit the Google profile of a service account, therefore you can't modify the display name.

Is there any way to download folder and files for specific user using box api?

I have a user which has co-admin privileages. i HAVE ACCESS AND AUTH TOKEN CORRESPONDING TO CO-ADMIN. In my code I first fetch all the users present under given enterprise account and then for some specific users i want to download all the folders and files. Is there any way to do so?. I know that box api does have GetFolder(). but this api does not take any arguments such as username . It requires a folder id and It will always return all the folders and files under that id.
It sounds like you want to use the On-Behalf-Of header. Once you've authenticated an admin account, you can use this header to make any API call on behalf any of the users in the admin's enterprise.

show domain user name in google sites

This is probably very basic but I want to create a web app script that will display a welcome to ...google domain username in a google site.
Attempts such as this so far have failed..
// The code below will display the email address of the person running the script
Browser.msgBox(Session.getActiveUser().getEmail());
You can find this in the documentation in the base class description
you can try the following
app.add(app.createLabel('Active user login id:' + Session.getActiveUser().getEmail()));
app.add(app.createLabel('Efective user login id:' + Session.getEffectiveUser().getEmail()));
Maybe an idea to put those functions within the html service.
Working doGet() example