Retrieving photos from Google People API results - google-api

The people.getBatchGet call in the People API returns resources of type Person which have a photos field with a url.
Attempting to retrieve these photos with a GET request to the photo urls authorized with the same credentials used for the people.getBatchGet call results in a 403 error.
What am I missing here?

Related

Trying to get downloadable url of the SharePoint file of the attachments shared in the teams/channel chat

We are trying to access the SharePoint url of the attachments shared in the teams/channel chat and for the teams meeting recording.
We have used Oauth2 to retrieve the auth token and using Microsoft graph api to get the downloadable/public url for the same
making a GET request with token in the request header still returns 401 Unauthorised error
Although we are able to get the downloadable url if we use site-id , list-id and item-id in the GET request https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items/{item}/driveitem
But these are not available when our message extension app is invoked from a message
Posting the Answer for better knowledge
Copying from #Saonti comments
Using Graph API explorer are you able to get the drive item with this API graph.microsoft.com/v1.0/sites/%7Bsite-id%7D/lists/… ? Or you are getting error?

Is it possible to get google api access token by using any REST API Client

I am looking for tips or tutorial where I can fetch data from youtube data api.
By using only api key, I can use any rest api client in order to fetch many informations from https://www.googleapis.com/youtube/v3/channels.
And now, I would like to get auditDetails which needs authorization token https://developers.google.com/youtube/v3/docs/channels/list#auth.
[Edit]
By following the steps below (Using OAuth guides), I can now make request but I have an error 400 which is redirect_uri_mismatch:
The redirect URI in the request, http://localhost:9874, does not match the ones authorized for the OAuth client
In my console developer configuration, I set the redirect authorized url to http://localhost/authorize.php
So I do not understand why during the authentification, it uses http://localhost:9874

How to get image url for specific twitter status - Twitter API

I've seen from this post that you can get a user profile image from any of these:
https://twitter.com/[screen_name]/profile_image?size=mini
https://twitter.com/[screen_name]/profile_image?size=normal
https://twitter.com/[screen_name]/profile_image?size=bigger
https://twitter.com/[screen_name]/profile_image?size=original
And that redirects to an image, which works fine. I'm trying to similarly get the image from a status of form
https://twitter.com/[screen_name]/status/894610590915641345/photo/1
This doesn't redirect to anything, and neither does this:
https://twitter.com/[screen_name]/status/894610590915641345/photo/1?size=original
Searching Twitter API brings up only their libraries. Is there a URL to do this?
No, there's no shortcut URL to get the images attached to a Tweet. You'll need to retrieve the Tweet via the API, and then extract the media URLs from the JSON response. Use the statuses/lookup endpoint to get a Tweet by ID.
I'd also suggest using the API to get the user profile image, as the shortcut URL you mention is not officially supported, does not work on mobile, and may be removed in future. Use the users/show endpoint to retrieve a user by screen_name.

Unable to get some Facebook Ad API fields

I am trying to get the Video fields, but API is not returning the columns even API requesting in fields.
Fields I'm trying to get are: video_p25_watched_actions,video_p50_watched_actions,video_p75_watched_actions,video_p100_watched_actions.
My API request parameters as below:
request.AddParameter("export_columns", "['actions:video_view','actions:video_view:video_p25_watched_actions','adgroup_name','date_start','date_stop','campaign_group_name','campaign_name','adgroup_id','impressions','clicks','spend','actions:like','actions:offsite_conversion','actions:receive_offer','actions:rsvp','actions:leadgen.other','actions:link_click','actions:comment','actions:post','actions:post_engagement','social_impressions']");
request.AddParameter("fields", "['ad_name','campaign_name','adset_name','ad_id','impressions','clicks','spend','actions','social_impressions','video_p25_watched_actions','video_p50_watched_actions','video_p75_watched_actions','video_p100_watched_actions']");
request.AddParameter("filtering", "[{ 'field':'ad.impressions','operator':'GREATER_THAN','value':0}]");
Please help me if I am missing anything.

Can you make a CORS Google API request without OAuth?

I would like to make a Google API request from the client instead of the server, in order to save time and load on the server. This page explains using OAuth for CORS, when you want to access a user's private data. I don't want a user's Google data, and don't want users authenticating to their Google account.
The fact that I can get a browser API key makes me think that this is possible, but when I do this:
$.get 'https://maps.googleapis.com/maps/api/place/nearbysearch/json?',
key: browser_key
location: "#{lat},#{lon}"
radius: '300'
sensor: true
I get "No 'Access-Control-Allow-Origin' header is present on the requested resource."
Using the JS client works. I gave an HTML node to the PlacesService constructor instead of a map.
https://developers.google.com/maps/documentation/javascript/places

Resources