How to get all Gsuite account applications from Google directory API? - google-workspace

I want to get all G-suite application list that user has access.
There is an API to fetch all third party application that user has access.
API reference https://developers.google.com/admin-sdk/directory/v1/reference/tokens
But we want SAML application list as well as google apps like google voice.
We can get all events for that application but there is no api to fetch only application list
https://developers.google.com/admin-sdk/reports/v1/reference/activities/list.
Could any one help me to get all application list?

Related

Google Analytics API - how do I get access tokens without being an Admin

I'm very new to using APIs and I'm struggling to figure out the authentication. With my email I can log in to a corporate analytics page and view the information. My account is only at a 'user' level. How do I get access tokens so I can scrape the data from the page using the Google API? Do I need the admins of the page to get these tokens? I tried using the generate access token but I don't know the service account email. Any advice would be appreciated because I'm so confused.
Answer: how do I get access tokens without being an Admin
As long as your personal account has read access you can use Oauht2 to authorize your application and then be able to access the data that way you do not need to be admin.
All your other questions 😊
How do I get access tokens so I can scrape the data from the page using the Google API?
First off if you use Oauth2 in your application and login with your own user you you will be able to use the Google Analytics api as you have read access thats all you need for the Google analytics api in order to request data.
Do I need the admins of the page to get these tokens?
No anyone with read access can authorize an application to access the google analytics api.
I tried using the generate access token but I don't know the service account email.
Service accounts are completely different than normal Oauth2. A service account is a dummy user which needs to be preauthorized to access the data it has nothing to do with your personal access. To preauthorize a service account to access the google analytics api you will need to have admin access to the google analytics account and take the service ac count email address and add it as a user on the google analytics account. It will then have access to read the data.
Any advice would be appreciated because I'm so confused.
Decide if your application should be allowing users to login to it and access the data on their own google analytics accounts. If so then you should be using Oauth2 and not a service account.
If you are only trying to access this single google analytics account then you should be using a service account. However you will need to contact the admin to have them grant your service account access to the data.

Google Analytics Embed API

I am working on embedding of our google analytics dashboard in our web portal using its API, after walking through this example, Embed API - Getting Started
I am facing a problem; that when I logged in to google analytics account and run this example, it is fetching the results, but when there is no logged in session, it returns
Object { errors=1, code=403, message="User does not have any
Google Analytics account."}
retrieved from browsers developer tools... I have added the service account email address to Analytics Admin Console as well. please suggest the solution
You need to have a session logged in with access to the account.
Check the Google Account you are logging in with it needs to be one that has access to the Google Analytics account that you want to check. The Google account you are authenticating with currently doesn't have access to any Google Analytics Accounts.
Service account wont work with embedded API you need to use Oauth2.

Difference between Authenticating user into my website using gmail account and googleplus account

I am developing a website, where users will can login using their Google account. When i was about to develop this feature i came to know about two things
Gmail api
Google+ api(social)
I want to know want is the difference between these two apis, why google is providing two different apis for authentication. I tried using google+ api, and if the user doesn't have an account in Google+ then google is forcing user to register into google plus and then login to my website.
Which one is better to use for authentication into our website google or google+?
If you will use Google plus Api for authentication process then user need to have google plus account and If user is not having google plus account then He need to create it
I suggest you to use Google api for authentication because you can get basic information with it but if you want to get all social media data of google plus then you have to use google Api
Simple - API calls do not access any private user data
Authorized - API calls can read and write private user data, or the applications own data - API key plus OAuth 2.0 credentials (different for different application types)

Is it possible to get Google Analytics data for any website (not my website) using Google Analytics API?

Is it possible to get Google Analytics data for any website (not my website) using Google Analytics API?
I have created Google API for Google Analytics. Then I am trying to access the Google Analytics data for a different profile id.
It is working for my profile id but not other user's profile id.
No. You need to be granted permission to the account or view to access it. GA has documentation here
The Google Analytics API relies on [OAuth 2.0] (https://developers.google.com/analytics/devguides/reporting/core/v3/gdataAuthorization) for authorization. This simply means that the data extraction module you created needs explicit permission to access a Google Analytics Account. Moreover, the scenario you describe about using a different Profile ID wouldn't work due to the nature in which Accounts and Profiles (Views) are [related] (https://support.google.com/analytics/answer/1009618?hl=en) to each other in Google Analytics. So for e.g. if your Google Analytics Account is linked via your email id foo#gmail.com, the profile ID that you use to query must correspond to an actual profile in your Google Analytics account. This is the reason why a random Profile ID wouldn't work.

client id for google place API

I want to use Google places API for my web application.I filled the
form with my Publisher Adsense Id bt i didn't receive any email from
google containing client ID for my use.Is google places API open for
use now and how can i get this client ID?
First you need to go to the Google APIs console and log in with your Google account. After that click on API access, and from there you will be able to create your own public client ID.