I've got a Client ID and Client Secret for some Google-based authentication in a Django app. How do I use this information to get the actual Google project name/ID that is being used?
Using an API would be great but I'm down for clicking through a bit of web UI too.
P.S. -- I am unsure how to tag/categorize this question so I appreciate any help there.
My co-worker pointed out the obvious answer. Here's an example client ID:
GOOGLEAUTH_CLIENT_ID=1234567890-aksjfljsalfjslfjlksf.apps.googleusercontent.com
The digits preceding the first hyphen are the Google Cloud Project Number. Voila! No API call required. face smash
The Number can be used to look up the ID using gcloud projects list:
PROJECT_ID NAME PROJECT_NUMBER
example-river-417 Example 1234567890
asdfjkl Example2 1234567891
Related
I want to publish my app but Google is telling me that the app name is against theirs Data Policy.
Based on the information you sent us, it looks like your project my-app-name doesn't show its identity to Google users when asking to access Google user data.
Specifically, there's a problem with your project's app name. This violates Google API Services: User Data Policy.
My name in Oauth contain word "YouTube"/ the project is related to YouTube.
So this is the problem? I can't use the word in my app name? So can I use something like u2b? What kind of names are allowed?
I can't find it in the TOS/data privacy.
Thanks!
my-app-name is not a valid name for your application.
You application name should clearly identifie your brand name as the company who created the application.
I would almost expect it to for example contain your domain name.
My could mean anyone again it needs to clearly identify your company or brand.
so no you can't name your app my-app-name and have it verified.
You also can't use any registered trademark names in your name unless you own the trademark
Stay away from anything remotely resembling a google product or potential google product
(I have done a search through the questions to see if I could find something on this, but have not found answers.)
I have two google groups through my G-suite and I want to automatically add people to both groups after they sign up for my club through a process on my website. I think this should be possible using:
https://developers.google.com/admin-sdk/directory/v1/guides/manage-group-members
I have gone into the API Console, created a new project, enabled the Admin SDKI API, and got an API key. However, I think I am running into the Authorization issue because we keep getting an error that the authorization token is missing.
I have tried using the OAuth 2.0 but I'm not sure if this should be "Internal" or "External". I'm not creating a whole app for someone to use - all I want to do is on the back end of the site take information that comes through when someone joins the club and automatically have them added to my google groups.
Is it possible for someone to please explain to me what I need to do?
I'm sorry this is kind of a basic question.
Thank you for your help.
I am trying to use Apache libcloud to access GCP and hopefully be able to launch compute instances. So, following the documentation, I have created a service account on GCP associated with my email and given it the owner access for the moment. After that, I am using libcloud as follows:
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
ComputeEngine = get_driver(Provider.GCE)
driver = ComputeEngine('luca#googlemail.com', 'gcp-key.json', project='first-gcp')
This actually displays a URL and asks me to enter a code from it. When I click on the URL, I get the error message:
The OAuth client was not found.
This was not the workflow I was envisioning. I thought providing the secret key would just let me in and I would be able to then use methods for launching instances etc. So, I am not sure if I am doing the right thing by using a service account on GCP for this.
So, I get the following asking for a code:
So I get this:
Please Go to the following URL and sign in:
https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=xxx&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdevstorage.full_control+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fndev.clouddns.readwrite&state=Libcloud+Request
Enter Code:
How should I approach this? We will be a few remote people working on this eventually so ideally each person will have their own key to use and this should happen in a bit autonomous way in the sense if codes do not need to be entered manually, that would be great.
From the Console (https://cloud.google.com/console), select your project. When your project is open, select "APIs & auth" and then "Credentials" as shown below:
In Development: Preferably make one for each, could use one for all for testing purposes.
In production: For each user to use this service, create a service account.
When you download the service account, you should have it as a .pem or .json file. Use the email address from the service account (if you open the json/pem you shd be able to see the email) and give it the correct values region/project/email and path to the pem file.
The code you're using is correct, avoid using the name "ComputeEngine" since it may be a keyword (even though it probably isn't, best practice)
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
Driver = get_driver(Provider.GCE)
gce = Driver('your_service_account_email', 'path_to_pem_file',
datacenter='us-central1-a',
project='your_project_id')
Have a look here If you're confused on any steps. But this should def work.
I'm setting up a 'Login with Facebook' button and have it on a test page. http://www.digitalinkmultimedia.com/my-account
I believe I have things set up correctly for the app at developers.facebook.com. The app says it's public and available. I'm using Business Catalyst as the CRM, and the facebook integration appears to be correct (App ID, App Secret, etc)
When I click the login with facebook button the first time I get the message about my profile info being shared....but when I continue I get a 'Facebook login is currently unavailable'.
One thing I noticed is that when the popup first loads the FBTOKEN parameter has a number in it, then it quickly changes to FBUTOKEN=00000000-0000-0000-0000-000000000000#=
Any suggestions would be appreciated.
In the Facebook developers console for your app, please go to App Review > Permission Feature and give Advanced Access for "public_profile" and "email".
Facebook Login of the iOS app is working well without the Advanced Access setting.
If you're experiencing this now (end of 2020) it might be due to a pending "Data Checkup":
As part of an ongoing effort to protect user data and drive long-term value for developers, Facebook has introduced an annual Data Use Checkup for app admins to certify that their API access and data use comply with Facebook Platform Terms and Developer Policies, together with all other applicable terms and policies.
Enter https://developers.facebook.com/apps and you should see your app in red color with a note that Data Checkup is due.
You'll need to spend a few minutes to fill in a simple form...
After you're done you should be good 👍🏼
https://developers.facebook.com/apps
https://developers.facebook.com/apps/395514758911597/fb-login/settings/
Get Advanced Access
I agree that any data I receive through public_profile will be used in accordance with the allowed usage.
download open ssl and paste in E drive create folder software--------
and extract here openssl
keytool -exportcert -alias androiddebugkey -keystore "C:\Users\USERNAME.android\debug.keystore" | "PATH_TO_OPENSSL_LIBRARY\bin\openssl" sha1 -binary | "PATH_TO_OPENSSL_LIBRARY\bin\openssl" base64
keytool -exportcert -alias androiddebugkey -keystore %USERPROFILE%.android\debug.keystore | D:\FbDependentSoftware\bin\openssl sha1 -binary | D:\FbDependentSoftware\bin\openssl base64
D:\FbDependentSoftware
password :- android
8Rc05yVGh4n4xVIx4lkfCYYrzrM=
For me #NajamUsSaqib's comment worked, tried getting advance Access for Email and Public Profile and it started working.
If anyone is still facing this issue. Please check in your developer account if you have a pending Data use Checkup.
Once you complete it, it should work.
I had the same problem and got fixed the following way:
Site Settings>Social Integration
on the field where it says "Enter Site URL of your Facebook application" make sure you have your address as follow:
http://www.example.com not http://www.example.com**/**
Basically it will not connect to your FB App if you have a " / " after your domain.
I have got the same issue.
Check the setup is done or not. If not then review all the points that need to add the data
make sure add icons and url properly
make sure add domain
make sure you have ask for the permissions that you need
add platform and hashkey for android correctly
Most important thing you need to work in live mode
After all the above setup you will get the success
Developers please go through with the latest doc there is a-lot of changes in doc while integrating the facebook login or graph api or instagram api's.
I'm trying to run a promotion for foursquare venue's so when a person check's into their location they are given a unique code to redeem on the venue's website when checking out in their online store. Is this possible? I see all over you can give out coupons but no where can I find in the API you can run a service to generate a code. I have the service created with PHP already to give codes according to the users IP.
Anyone know a solution to achieving this?
There's no service built into the API to generate/display a unique code. Generally people with this use case give a URL in the unlock copy for the user to click on which takes them to a site which gives them a code / unique QR code / etc.