I tried with google ads api npm with the query
SELECT ad_group_ad.ad.name, ad_group_ad.ad.type , ad_group_ad.ad.app_ad.headlines,ad_group_ad.ad.app_engagement_ad.headlines,ad_group_ad.ad.text_ad.headline
FROM
ad_group_ad
Response
{
ad: { resource_name: 'customers/xxxxx/ads/xxxxxx', type: 3 },
resource_name: 'customers/xxxxx/adGroupAds/xxxx~xxxxxx
}
But response not containing ad name.
Ad Id and resource name is there.
How can I get the ad name?
IIRC at least in the Adwords API (the Ads API's predecessor), only image ads have a name.
It might be worthwile to run your query on an account where image ads are present (ad_group_ad.ad.type = IMAGE_AD) and see whether your response contains the ad.name field in that scenario.
Related
I have a Laravel application which uses Socialite for Sign In With Google functionality. The authentication part works fine and the attributes such as email, avatar, name etc. are loaded correctly. I have a few links to other google services in the app such as Google Drive and Google Meet. When these links are used, they try to access the drive file or meet using the default google account on their browser authuser=0 or /u/0/, but I want it to use the index of the account with which they have signed in to the Laravel app, for example authuser=1 or /u/1/. Can I retrieve the index of the signed in user during sign in? I can store this and use it to generate the right URLs.
I am trying to move Google Drive file (Google Sheet/Google Document) from Shared Team Drive to another Shared Drive but my Service account is failing to get file filed parents from v3.
I've tested with the Playground and noticed that "parents" field is only returned when you are Authenticated with Google OAuth 2.0 BUT NOT when you are using API Key (or in my case Service auth file).
https://developers.google.com/drive/api/v3/reference/files/get
parents screenshot
no parents screenshot
Working fine with My Drive but not when returning parents for Shared Drive files.
// My Google Client is initialised
const googleClient = new google.auth.JWT(
privatekey.client_email,
null,
privatekey.private_key,
['https://www.googleapis.com/auth/spreadsheets',
'https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/calendar']
);
// Google Drive v3
const googleDrive = google.drive({
version: 'v3',
auth: googleClient
});
// Getting File details
const file = googleDrive.files.get({
fileId,
fields: '*',
supportsTeamDrives: true
});
Can you help me with any ideas or explain me the difference in the API responses?
API Keys get their permissions based on the project permission (and other settings on the Cloud Console).
OAuth authenticates as the current user and is able to access the APIs as that user would.
You can read more about that here.
In this case, the Try It Feature does not have an API key able to access the methods you are trying to execute.
Hope this helps!
I guess Gmail API doesn't provide any way to get users profile image.
I can use Google+ API to get the url but I should have user's google+ username.
I only have user's email id and his/her account access token(gmail).
The answer to this question points to a url hosted by picasaweb.google.com which is discontinued now and also does not return any result for emailid of users with Gsuite account.
If you have authenticated the user. You should be able to use people.get
GET https://www.googleapis.com/plus/v1/people/me
response
"image": {
"url": "https://lh5.googleusercontent.com/-a1CWlFnA5xE/AAAAAAAAAAI/AAAAAAAAl1I/UcwPajZOuN4/photo.jpg?sz=50",
"isDefault": false
},
This will require that you have profile scope requested or one of these.
https://www.googleapis.com/auth/plus.login or https://www.googleapis.com/auth/plus.me
It will also require that the user created a google+ account. This is the only way to get the users profile picture unfortunately.
Option two is the people api which is linked to google contacts which may include the users profile picture if they added it. People.get
GET https://people.googleapis.com/v1/people/me?personFields=photos
Also returns
"url": "https://lh5.googleusercontent.com/-a1CWlFnA5xE/AAAAAAAAAAI/AAAAAAAAl1I/UcwPajZOuN4/s100/photo.jpg"
In my Win 8 store app I am using fb sdk for .net for authentication and I need to get the user's email linked with facebook.
I am invoking this function
dynamic result = await fb.GetTaskAsync("me");
Result consists of 12 different fields such as id, name, cityId and so on, but there is no email field.
I want to ask, if it is possible to access the email of user which is linked with his facebook account.
Thank you.
You will need the extended permission email, then you can get the email from the me field. You can always test your calls here: https://developers.facebook.com/tools/explorer/
I'm getting this error when trying to add products to google content, my google account seems ok the site is verified, I've mapped attributes , price, name , description , condition.
Any ideas ?
Error code: auth/frontend/whitelisted. Internal reason: Customer xxxxxx has not been whitelisted for the Content API for Shopping. See 'request' for product 'The Fairytale Forest Album' (in 'Default Store View' store)
your account needs to be approved for access to the content API fill in this form and wait for google. http://support.google.com/merchants/bin/request.py?contact_type=content_api