I implemented a Google+ and a Facebook login button and got access token successfully. However I didn't save it in my server. For new business, I need to get display name and image of authorized users.
For Facebook integration, I can use :
https://graph.facebook.com/userId?fields=picture.width(720).height(720),name&access_token=APP_ID|APP_SECRET
Are there any similar way for Google+ API to get public information of Google+ user (image, name, email..) without the missing access token?
Google has something called a public API key. Public API keys can only be used to access Public data. So if the user in question hasn't set something on there profile public you wont be able to see it.
You will need to go to google developer console an register your application there you will be able to create a public key and enable the google+ api.
request (note the key on the end):
GET https://www.googleapis.com/plus/v1/people/+LindaLawton?key=XXXXX
Response
{
"kind": "plus#person",
"etag": "\"Sh4n9u6EtD24TM0RmWv7jTXojqc/t4cdVyNXc5UKH1p-n75jDwEzvvw\"",
"occupation": "Google Developer Expert, BIA Developer at Targit",
"skills": "Experience primarily in regards Microsoft products, Visual Studio, Bids, C# and asp.net. Past experience with PHP,JavaScript, MySQL and Linux. In recent years I have begun focusing on Business Intelligence, Data Warehousing, SQL Server / Analysis Services / Integration Services. Experience with OAuth2, Google Analytics API, Google Drive SDK.",
"gender": "female",
"urls": [
{
...
}
],
"objectType": "person",
"id": "117200475532672775346",
"displayName": "Linda Lawton",
"name": {
"familyName": "Lawton",
"givenName": "Linda"
},
"tagline": "Google Developer Expert 2014 - 2017",
"braggingRights": "Extreme Beekeeper first to recorded an Hive inspection using Google Glass with out a veil on.",
"aboutMe": "\u003cdiv\u003e\u003cb\u003eBackground\u003c/b\u003e\u003c/div\u003e\u003cdiv\u003e\u003cdiv\u003eI have been working as an application developer since 1995. I have worked with a number of database systems Oracle, Microsoft SQL Server, and MySQL. In recent years I have been mainly working with Microsoft products, Visual Studio, SSIS, and C#. I the past I worked a lot with web development PHP, JavaScript, Ajax, power-builder, Cobol and ASP.net.\u003c/div\u003e\u003c/div\u003e\u003cdiv\u003e\u003cbr /\u003e\u003c/div\u003e\u003cdiv\u003eWhile I have done front end development in the past. I find working with backed development working on automated systems fascinating. I have spent the last 5 years creating custom SSIS (Dlls), and services and APIs for the cloud (Azure).\u003c/div\u003e\u003cdiv\u003e\u003cbr /\u003e\u003c/div\u003e\u003cdiv\u003e\u003cb\u003eGoogle API Addiction\u003c/b\u003e \u003c/div\u003e\u003cdiv\u003eIn 2012 I began working with the Google APIs, starting with the Google Analytics API. I learned to appreciate the fact that Google is so open and willing to give us access to their systems. I started blogging about how to use the APIs writing short tutorials with sample projects. \u003ca href=\"http://www.daimto.com/\" rel=\"nofollow\" target=\"_blank\"\u003eDaimto - Data Import Tutorials\u003c/a\u003e. This along with my presents on a number of \u003ca href=\"http://stackoverflow.com/users/1841839/daimto\" rel=\"nofollow\" target=\"_blank\"\u003eDeveloper forms\u003c/a\u003e lead me to discovered by Google. I became one of the first \u003ca href=\"https://developers.google.com/experts/+LindaLawton\" rel=\"nofollow\" target=\"_blank\"\u003eGoogle Developer Experts for Google Analytics\u003c/a\u003e. \u003c/div\u003e\u003cdiv\u003e\u003cbr /\u003e\u003c/div\u003e\u003cdiv\u003eI also help support the \u003ca href=\"https://github.com/google/google-api-dotnet-client\" rel=\"nofollow\" target=\"_blank\"\u003eGoogle APIs client Library for .NET\u003c/a\u003e which provides simple, flexible, and powerful access to Google APIs such as Drive, YouTube, Calendar, Storage and Analytics.\u003c/div\u003e\u003cdiv\u003e\u003cbr /\u003e\u003c/div\u003e\u003cdiv\u003e\u003cb\u003eLife\u003c/b\u003e\u003c/div\u003e\u003cdiv\u003eI grew up in a small town in \u003ca href=\"http://en.wikipedia.org/wiki/Dartmouth,_Massachusetts\" rel=\"nofollow\" target=\"_blank\"\u003eMassachusetts\u003c/a\u003e, USA, I moved to \u003ca href=\"http://en.wikipedia.org/wiki/Denmark\" rel=\"nofollow\" target=\"_blank\"\u003eDenmark \u003c/a\u003ein 1998 and have lived here since. I have a 22 year old daughter. My hobbies include reading science fiction, painting, and gardening. \u003c/div\u003e",
"url": "https://plus.google.com/+LindaLawton",
"image": {
"url": "https://lh5.googleusercontent.com/-a1CWlFnA5xE/AAAAAAAAAAI/AAAAAAAAdVM/sHkU9F-AwwQ/photo.jpg?sz=50",
"isDefault": false
},
"organizations": [
{
...
}
],
"placesLived": [
{
...
}
],
"isPlusUser": true,
"circledByCount": 1879,
"verified": false,
"cover": {
"layout": "banner",
"coverPhoto": {
"url": "https://lh3.googleusercontent.com/uDdUhB6o9WkVDpEft9VMBS5hm8nYTh2eCf_2RQ297u61U0y-98WBNSrlGvKz6ksHiuV20Rc-=s630-fcrop64=1,099f2649dfffc883",
"height": 696,
"width": 940
},
"coverInfo": {
"topImageOffset": -7,
"leftImageOffset": 0
}
}
}
Related
As part of MFA in a custom policy we're using AzureMfaProtocolProvider to send one-time codes via SMS.
For some users we're seeing the following error:
{
"Key": "Exception",
"Value": {
"Kind": "Handled",
"HResult": "80131500",
"Message": "ErrorCodes: UserMessageIfBadReputation",
"Data": {
"IsPolicySpecificError": false
}
}
}
I can't seem to find any information regarding this error in the docs.
How can I figure out what triggers this and why it was triggered for that specific user?
PhoneReputation service is integrated with Azure MFA to provide a near-real time determination which tracks tracks the usage and reputation of phone numbers as they are used across various Microsoft services.
Any particular browser user agent having the issue, few days back i worked on a similar issue where latest version of firefox reported this kind of issue reference: https://learn.microsoft.com/en-us/answers/questions/1090554/azure-b2c-unblock-phone-number.html?childToView=1097185#comment-1097185
Also where are the users located who reported this error ? any specific region/country code users reported this issue.
When creating an Azure Media Services Job via the REST API, I cannot set a presetOverrides property on the JobOutputAsset as defined in the documentation: https://learn.microsoft.com/en-us/rest/api/media/jobs/create#joboutputasset
My request body is:
{
"properties": {
"input": {
"#odata.type": "#Microsoft.Media.JobInputAsset",
"assetName": "inputAsset"
},
"outputs": [
{
"#odata.type": "#Microsoft.Media.JobOutputAsset",
"assetName": "outputAsset",
"label": "en-US",
"presetOverride": {
"#odata.type": "#Microsoft.Media.AudioAnalyzerPreset",
"audioLanguage": "en-US",
"mode": "Basic"
}
}
],
"priority" : "Normal"
}
}
The error message thrown is:
{
"error": {
"code": "InvalidResource",
"message": "The property 'presetOverride' does not exist on type 'Microsoft.Media.JobOutputAsset'. Make sure to only use property names that are defined by the type."
}
}
When removing the presetOverride data, everything works as expected. The official documentation clearly states that the Microsoft.Media.JobOutputAsset does have a presetOverride property though. What am I doing wrong?
It is important to select the correct API version when communicating with the Azure Media Services REST API.
In this case, api version 2020-05-01 from the Azure Media Services Postman examples was used. But the presetOverride option is only available starting with version 2021-06-01.
Setting api-version=2021-06-01 as a GET parameter enables Preset Overrides.
couple of concerns here Rene. I would not recommend using the raw REST API directly for any Azure services. Reason being is that there are a lot of built-in retry scenarios and retry policies that are already rolled into the client SDKs. We've had many customers try to roll their own REST API library but run into massive issues in production because they failed to read up on how to handle and write their own custom retry policy code.
Unless you are really familiar with rolling your own retry policies and how Azure Resource Management gateway works, try to avoid it and just use the official client SDKs - see here - https://learn.microsoft.com/en-us/azure/architecture/best-practices/retry-service-specific#general-rest-and-retry-guidelines
Now, to answer your specific question - try using my sample here in .NET and see if it answers your question.
https://github.com/Azure-Samples/media-services-v3-dotnet/blob/3ab85647cbadd2b868aadf175afdede67b40b2fd/AudioAnalytics/AudioAnalyzer/Program.cs#L129
I can also provide a working sample of this in Node.js/Typescript in this repo if you like. It is using the latest 10.0.0 release of our Javascript SDK.
I'm working on samples in this repo today - https://github.com/Azure-Samples/media-services-v3-node-tutorials
UPDATE: Added basic audio in Typescript sample.
https://github.com/Azure-Samples/media-services-v3-node-tutorials/blob/main/AudioAnalytics/index.ts
Shows how to use the preset override per job.
On the Google Developers page here, it says "G Suite add-ons that extend Gmail do so on both desktop and mobile clients."
My published add-on linked here is on the Marketplace. It is just extending gmail (I've included my manifest file below). However, my add-on only appears on the web. I can't get it to show up on mobile.
What am I doing wrong or is there a bug? Why is my published Gmail add-on not showing up on the mobile gmail app?
Thank you for all your help!
Manifest File (appscript.json):
{
"timeZone": "GMT",
"dependencies": {
},
"gmail": {
"name": "Smarty",
"logoUrl": "https://images.squarespace-cdn.com/content/v1/5e55a48565fc4c78f503ac25/1586923750635-O2EA9H2ZLCH4B926L8T3/ke17ZwdGBToddI8pDm48kJK4Mm1kch8SFO9ZNkN1NT97gQa3H78H3Y0txjaiv_0fDoOvxcdMmMKkDsyUqMSsMWxHk725yiiHCCLfrh8O1z5QHyNOqBUUEtDDsRWrJLTmN9YSRtfoTLg6dUq-6F17A0FFZK5fArcnK1IqGweyunyWChwIwkIJ_P7MaZif-uMs/SmartyDescriptor.png",
"contextualTriggers": [{
"unconditional": {
},
"onTriggerFunction": "getContextualAddOn"
}],
"primaryColor": "#40c2ff",
"secondaryColor": "#e84f81"
},
"oauthScopes": [
"https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/gmail.addons.execute",
"https://www.googleapis.com/auth/gmail.addons.current.message.readonly",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/script.external_request",
"https://www.google.com/m8/feeds"
],
"urlFetchWhitelist": [
"https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment-with-locales.js",
"https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.28/moment-timezone-with-data.js",
"https://api.wit.ai/"
],
"runtimeVersion": "V8"
}
just to make sure what is meant by mobile: it is the mobile gmail app (android/iOS) not a mobile web browser. because it is not working in the latter
you need to open an email on your gmail app, scroll to the bottom and click on the addon icon next to the text "Available add-ons", see https://developers.google.com/gsuite/add-ons/how-tos/starting-addons#on_mobile_gmail_only
and currently thats the only way. as there is this restriction that you can only open it from within an email, so there is no homepage or view outside of an email. so there the add-on is simply not available. see https://developers.google.com/gsuite/add-ons/how-tos/starting-addons#on_mobile_gmail_only
that likely may have been why you did not find it
Youtube API v3 enables developers to retrieve specific information regarding a particular video, among the returned data a part called topicDetails can be requested as per the following example:
Request:
https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&part=snippet,topicDetails
Response:
{
"kind": "youtube#videoListResponse",
"etag": "\"r3ahjFekUqNiL0By9B5wQ2uTZHM/i4Bt9XfY8YZ1ctSlg8BWcLD8HFQ\"",
"items": [
{
"id": "7lCDEYXw3mM",
"kind": "youtube#video",
"etag": "\"r3ahjFekUqNiL0By9B5wQ2uTZHM/hYUGsnkhqATV4OXNG43HIObqlyw\"",
"snippet": {
"title": "Google I/O 101: Q&A On Using Google APIs",
[ some properties have been omitted here ],
"categoryId": "28"
},
"topicDetails": {
"topicIds": [
"/m/045c7b",
"/m/0z5n",
"/m/04136kj"
]
}
}
]
}
The topicIds field comes machine encoded and topic information can be retrieved through the Freebase API (using this identifiers) which is being deprecated. I was unable to locate any update on YouTube documentation regarding the impact of freebase API deprecation and as I manage a large node.js code base that relies heavily on YouTube topicDetails I would like to ask if there is any known programatic alternative to recover topic information from stable sources other than Freebase?
As part of the Freebase retirement announcement, Google said that they would be offering a couple of new Knowledge Graph APIs and that there would be a 3 month overlap between the availability of these new services and the shutdown of Freebase.
Presumably Google services like YouTube which depend on Freebase MIDs will transition to these new services will transition to the new API (perhaps with unchanged identifiers), but not much is known concretely because a) Google is overdue with the new APIs and b) they haven't said anything else about the transition process.
UPDATE: The Google Knowledge Graph Search API became available in December 2015 and provides support for looking things up by KG ID (which is the same as the old Freebase ID used by YouTube).
I want to get chrome extension's version, name from chrome web store.
For example, I can see the app name "Do Not Merge WIP for GitHub" and the app version "1.0.6" in application's detail html page.
How to get these meta data?
I can find only publish API.
Using the Chrome Web Store Publish API - Google Chrome
Html page uses ajax/detail API, but I feel this API is too internal.
E.g. ajax/detail API
Related:
API call for user count in Chrome Web Store? - Stack Overflow
Chrome webstore search API to lookup by name to get app id - Stack Overflow
I'm afraid you can't do that with public APIs.
The Publish API doesn't work with this metadata, this is what it can extract.
So usually people just scrape the Web Store page.
I built npm modules for gathering metadata by scraping.
chrome-web-store-item-property
chrome-web-store-item-property-cli
Example:
$ chrome-web-store-item-property-cli nimelepbpejjlbmoobocpfnjhihnpked | jq .
{
"name": "Do Not Merge WIP for GitHub",
"url": "https://chrome.google.com/webstore/detail/do-not-merge-wip-for-gith/nimelepbpejjlbmoobocpfnjhihnpked",
"image": "https://ssl.gstatic.com/chrome/webstore/images/thumb.png",
"version": "1.0.6",
"price": "$0",
"priceCurrency": "USD",
"interactionCount": {
"UserDownloads": 421
},
"operatingSystems": "Chrome",
"ratingValue": 4.5,
"ratingCount": 2,
"id": "nimelepbpejjlbmoobocpfnjhihnpked"
}