Google Maps static image api used in dialogflow basic card gives problem, what to do? - dialogflow-es

I have in a basic card an image with a Google Maps Static Image Api url (shortened via Firebase Dynamic Links Shorten Api, which produces links like this https://example.page.link/UVWXYZuvwxyz12345).
This used to worked without any problems, but since a few months/weeks this does not work on the Google Assistant at least on smart phones anymore, I only get a grey rectangle instead.
It works however in the Action on Google Emulator without any problems. The link shortening is not the problem because when I shorten a link to an arbitrary image on the internet the image is displayed without problems.
The image is 192px high as required in the docs.
Has anybody got this working in the last weeks? Any idea what changed?
Here is an example of such an unshortened google maps static image api url (please replace the YYY at the end with your own google maps key):
https://maps.googleapis.com/maps/api/staticmap?size=330x192&markers=color:0xa10068%7Clabel:1%7C52.417908,9.6392955&markers=color:0x005eb8%7Clabel:3%7C52.42109,9.72186&markers=color:0x005eb8%7Clabel:5%7C52.4058059,9.7129063&markers=color:0x005eb8%7Clabel:7%7C52.42667,9.71606&markers=color:0x005eb8%7Clabel:8%7C52.32266,9.82017&markers=color:0x005eb8%7Clabel:9%7C52.3977616,9.7691778&path=color:green%7C52.417908,9.6392955%7C52.417908,9.6392955%7C52.42109,9.72186&path=color:green%7C52.4058059,9.7129063%7C52.42667,9.71606&path=color:green%7C52.32266,9.82017%7C52.3977616,9.7691778&path=color:green&maptype=roadmap&style=saturation:-30%7Clightness:30&style=feature:poi%7Cvisibility:off&style=feature:transit.station%7Cvisibility:off&key=YYY

Related

Why call of Google Slides API returns error?

I have essentially been using this code to load an image into Google Drive and then transferring that image over to Google Slides using Python and for some reason it stopped working today.
The code I based mine off of is located here:
http://wescpy.blogspot.com/2016/11/using-google-slides-api-with-python.html
However, today I reran it and am getting an error:
googleapiclient.errors.HttpError: https://slides.googleapis.com/v1/presentations/PRESENTATION_ID returned "Invalid requests[0].createImage: Access to the provided image was forbidden.">
I am wondering if anything have changed in Google API?
Are you getting the same error today 2020/3/6?
<HttpError 400 when requesting https://slides.googleapis.com/v1/presentations/6-7HI:batchUpdate?fields=&alt=json returned "Invalid requests[24].createImage: Access to the provided image was forbidden.">
The error happens every time I am trying to push any image stored in Google Slides using either createImage or replaceAllShapesWithImage.
Note that the URLs pointing at Google Drive content are related to Public content. Thus, the workaround above mentioned by #miladio is not useful at this time.
I ran into the same issue. You should check out this link, which describes changes to the Drive API: Upcoming changes to the Google Drive API and Google Picker API
The proposed solution here seems feasible, although I have not fully tested it myself: Google script replaceAllShapesWithImage with image from drive doesn"t work any more

Getting dailymotion videos exact same order with Dailymotion itself using API

I'm trying to make an aplication using Dailymotion API. I use video search and want to get them ordered like when you search on dailymotion itself but I think I couldn't find proper parameters.
I tried these get requests:
https://api.dailymotion.com/videos?search=Masterchef+(UK)+S15E11
https://api.dailymotion.com/videos?search=Masterchef+(UK)+S15E11&sort=recent
https://api.dailymotion.com/videos?search=Masterchef+(UK)+S15E11&sort=relevance
When I try to search in dailymotion.com, result:
Search Masterchef (UK) S15E11
Unfortunately it's not possible today to get the same search result with our public API.
The website uses our new API engine which is not available publicly yet but we are working on it.

How to get a published video URL

I'm trying to build my app based on Windows Media Services REST API (i'm not using any SDK, just plain rest api requests).
My steps are more or less like:
Create Asset
Assign write Access Policy
Assign upload locator
Upload a file to URL specified by upload locator path
Assign download Access Policy
Assign download locator
All those steps seems to work great but - how can i actually get the video streaming URL? I can't see anything, which looks like such url (as far as i know, it should look similar to upload URL from upload locator). Should i "fold" it by myself using some segments from various parts of api ?
Based on this article, i should append the path parameter with name parameter and /manifest (so it should looke like that: <path_param>/<name_param>.ism/manifest) but it gives me ResourceNotFound error. Anyway, i've seen that other people (like SHIBSANKAR) have found some way to obtain all asset urls so i think there is some way to do it but they have not descrbed how they've done it.
After reading all the docs and talking with microsoft support, i have figured it out. All the URL parts are returned by download locator and the formula looks like that:
#{BaseUri}/video.mp4#{ContentAccessComponent}
I hope someone will find that usefull someday.

Google Image Search API, does anyone have an example that works?

Trying to find out how to do Google image searches via an API / REST call. Apparently the image search API is deprecated and directs us to the Custom Search API.
But my first experiments with the Custom Search API, return results from my own website !!&*%%%$##!, which is not helpful in the slightest.
I need image results from Google images. Anyone have an example query that works?
You will basically want to generate a URL like this. Note the search type parameter at the end.
https://www.googleapis.com/customsearch/v1?key=YOUR API KEY&cx=YOUR CUSTOM SEARCH ENGINE IDENTIFIER&q=your query&searchType=image
You can read more here https://developers.google.com/custom-search/json-api/v1/using_rest
edit: changed searchType to lowercase based on comment below

Download images containing a specific tag with likes from Instagram

I would like to download images with a certain tag from Instagram with their likes. With this post I hope to get some advice or tips on how to do this. I have no experience with web scraping related stuff or web API usages. One of my questions is: can you create a program like this in python code or can you only do this using a webpage?
So far I have understood the following. To get images with a certain tag you have to:
need a valid access_token to even gain access to images by tag, which can be done like this. However, when I sign in you need to give a website. Does this indicate that you can only use the API's on websites rather than a python program for instance?
you use a media Tag Endpoint to search for tags by name.
I have no idea what the latest step will return exactly, but I expect that it will give me a specific image id that contains the tag. Correct? Now I will also need to get the likes belonging to these images. Just like latest step from before:
you use a likes Tag Endpoint to get a list of users that liked the image of which of course you can get the length.
If I can accomplish all of these steps it seems like I can achieve my original goal. I googled if there was something out there already. The only thing I could find was InstaRaider, but this did not seem to fit my description because it web scraped only the images from a specific user and not by tag or its likes. Any suggestions or ideas would be very helpful, I have only programmed in python and Java before..
I can only tell you that for URL you can use the localhost as this:
http://127.0.0.1
OR
http://localhost
I have also tried to do exactly the same before, but I could not, so I used a website to search for tags and images:
http://iconosquare.com/search/[HASHTAG]

Resources