Gmail API "Fields Mask" editor - gmail-api

Where is the field mask editor for making requests to Gmail API? is it removed? I found some questions related to this but seems the UI is not there anymore:
Google API Explorer: Where is the "fields" parameter editor?
GMail API Users.threads.list Missing "Messages" Field
I need to make a partial response that only return subject on the headers and the first body data on parts. With request format=full
Does anyone know where to find the UI editor or how to do this?
thank you!

Related

Context Carry-over with Alexa Conversations not possible?

I'm new to developing skills for Alexa and I'm following the tutorial "Build Multi-turn Skills Tutorial with Alexa Conversations". I've completed the tutorial up to the module Keep Track of the Conversation with Context Carry-over. Everything works so far but in the section "Replace Values with Slots" under step "r. Scroll down to the section that says Responses and select notifySuccess_getRecommendation_context_carry_over from the drop-down." there is no section "Response templates" in the modal. If I leave it as is I get an Error in the dialog menu:
"getRecommendation" under "API to Invoke" requires the same Response for all API Success / API Failure Dialog Acts.
Where do I find the "Response template" section for Alexa Conversations?
The user interface and some of the validations changed since the tutorial was written. You no longer need to link the response template together with the API in that screen.
Your error is not related to the dropdown. Based on the error you're facing, it sounds like you have annotated your dialogs so that a given API (API_1) is not always assigned the same response template across the API_success turns. Try making sure there only one API success response assigned to each API in your skill.
TL/DR: The UI changed. 2 APIs can share 1 API Success response, but the inverse is not true. Check your skill for 1 API with 2+ responses assigned to 'API Success'.

Example of sending mail with attachment in gmail using api. How will the body request be like working example?

I have seen the API documentation still not getting it. Could someone give me the following :
1) The exact URL which I should use
2) The headers which I should use exactly
3) The Body Request which I should use
Could someone help me with it ??
For me worked: adding the attachments to the raw body of the request to the endpoint: https://www.googleapis.com/gmail/v1/users/userId/messages/send. This is tested with files up to 25MB.
I also couldn't figure out how to use the upload endpoint.
To add the attachment to the raw body i add a new Mime part (to the multipart/related) of type the same as the attachment mime type and you also need to add the Content-Disposition header to set if the attachment is inline or attached.
You can check here for more information on MIME messages:
https://www.qcode.co.uk/post/70

Messenger m.me parameter not received on webhook

I'm trying to pass parameter via m.me link but for some reason it doesn't work. The webhook I get from the server doesn't contains the "referral" field.
I tried to re-subscribe to the web hook but it didn't help.
A video with the full flow of sending the parameters and the webhook response - http://g.recordit.co/XShDj1Rx29.gif
It turned out that if the page is unpublished the referral field parameters are not passed in the webhook.
Publishing the page solved the problem

How can I get media from instagram API?

I'm using the instagram API to get some images related to an specific hastag but when I call the API I get a message saying the API is deprecated.
I'm calling this endpoint
https://api.instagram.com/v1/tags/{tag-name}/media/recent?access_token=ACCESS-TOKEN
Any idea on what call I need to make to return the list of images with the requested hastag?
So I figure out why this is happening. Because the application is still in sandbox mode I can only get hashtag from the accounts that have access. Once the application is approved it will be able to pull the data from the API.

"No Access Control Allow Origin" in AngularJS

I am trying to develop a website that reads a JSON response from a certain endpoint and post it after certain processing to the page.
I am using $http.get(url) (AngularJS)
However I am facing problems getting the response.
I have tried to use other URLs and it worked then the cause of the problem probably is not the code.
The Error is: "No Access Control Allow Origin header is present on the requested resource".
Other responses suggested something related to CORS and privacy issues ; but when i type the URL directly in my browser it gives a JSON response directly. (So basically there is no privacy issues in the server side right?)
My question is what should I do ? Is there another way to get the content of the page pointed by the url (i am sure that it will only contains the JSON response)
Thanks in Advance
I came across this question:
1. If we substitute the URL in the address bar, it is similar to receiving data from the server of this site
In order to send requests to other servers need to use JSONP HTTPS for secure channel
Sending data can be carried out, but with the replies received will be a problem in the form JSON
Please send to the server if use PHP, then use CURL
JS->Our server->Server api->Our server->JS

Resources