Get google account owner from Google Project ID - google-cloud-messaging

Is it possible to get Google Account Email from the API Project ID? We are using the project id in one of our projects but I am not able to remember the account it was created with?

Try using the IAM commands in the Cloud SDK to see who currently is listed as a user/owner:
gcloud projects get-iam-policy <your-project-id>
That will return a list of current project members. It may not be the original owner, but this will let you know who all has access :)
Hope this helps!

Related

How to find which Google Cloud Project is associated with an instance of Google Classroom?

I'm trying to pull our Google Classroom data into a custom web application via the Google API Client (PHP). I was able to make a successful call using a service account set up in Google Cloud, but the call returned no Classroom data.
I'm assuming the Classroom data must be associated with a different Google Cloud Project, I'm just not sure which one. I don't want to create a service account for every single project and test them, there are too many projects. I've looked everywhere and I can't seem to find the answer to the question: how do I find out WHICH project a Google Classroom integration is associated with, so I can configure the API Client accordingly?
I tried looking through all Classroom settings to see whether there was any information about the Google Cloud Project being used to store the data. I tried contacting Google Support, but so far I've had problems getting an answer to my question.
Ultimately I just want to pull the Classroom data into our web application.
Thanks
To use a service account with google classroom api you must configure Domain wide deligation. This will allow the service account to impersonate a user on your domain.
$user_to_impersonate = "admin#yourdomain.com";
$client->setSubject($user_to_impersonate);
The service account will then behalf as though they were that person. It can then see everything that user has access to.
Without delegation in place the service account doesn't have access to anything.

Is there a way to add another user to my account?

I am currently using here api as free plan.
I am wondering if I can add some other users to my account in order to let them edit or update some information in my account.
This feature is not available in Developer Portal.

Disallow sharing Google Mobile Developer Services data with Google after allowed

When creating a new app on https://developers.google.com/mobile/add?platform=android&cntapi=gcm, I got the following to check or uncheck:
Share your Google Mobile Developer Services data with Google to help
improve Google's products and services. This includes sharing with
Google technical support, account specialists, and anonymous data for
benchmarking. If you disable this option, data can still flow to other
Google products that are explicitly added.
Unfortunately I accidentally checked the field/allowed sharing.
How can I disable/disallow it now after project is already created? Does anybody know how to do that?
Nothing is explicitly stated on which service this data sharing will be applied. However, just doing a quick search of that statement points to it being used for Analytics only.
And if you want to turn the data sharing off for Analytics, you can refer to this help doc:
Change your data sharing settings
You need edit permission to use this feature.
You must customize your data sharing settings when you sign up for an Analytics account, but you can return to the Admin section of an account and change the settings any time.
To change the data sharing settings:
Sign in to Google Analytics.
Select the Admin tab and navigate to the account you want to edit.
In the ACCOUNT column, click Account Settings.
Edit any setting and click Save.
If you just intend to use the project for GCM, I think it doesn't really matter if you allow it or not.

I need to group Google Apps users by their Organization

Here's what I'm trying to do:
When people log into our app, using Google Apps OAuth, they are automatically grouped within the app, by their organization.
We're already doing this with Slack, where a user logs in, says which team they want to log in from, and they are automatically grouped with other people from their Slack team.
With Google, it seems a bit more complicated. I do not need access to anything within the organization: no user list, no other e-mails, no files. All I need is the name of the organization, and some sort of unique identifier.
Is this even possible? I've been digging through this without much success: it seems like an admin from the apps account has to install or approve the app?
I'm getting the sinking feeling that this will have to be something setup via the Marketplace, but that's far from ideal from our perspective.
Can it be done?
What you want is the hd claim of the ID Token. This represents the "hosted domain" of the Google for Work user, i.e. their organization.
If you use the Google Sign-in library, you will be able to get the ID Token of the user, once you have that you can extract the hd claim. Try these docs: web, ios, android.

Google Contacts API doesn't return website extended properties

I've successfully got contacts information using the .NET library.
According to this question:
Get Google+ ID from Google Contacts
The contacts should be returned with an extended property called website that is a link to the contact google profile. However, none of my contacts are returned with this informations, and many of them are connected to a google profile.
I made sure I'm using the 3.0 version of the API but still no good...Does anyone knows what may be the problem?
Thanks!