Conversation Flow : android device/web simulator - google assistant - api.ai - webhook - [websocket/FCM push] - android device
From end of last week, access token is not delivered to our webhook server even if account linking was successful and it is displayed on web simulator debugging window. When we logged on webhook server, the account token value from api.ai was NULL. After this happened, next account linking is not processed even if I reset (turn it off and on again) api.ai agent.
I tried to make new actions project and migrate api.ai agent to new one, but it was the same. I make sure the same test has been successful before last week.
If anyone has gone through the similar issue, I hope your help.
I was also very confused because I was expecting the accessToken to be in the same JSON format as shown in the simulator.
if still not working please send the body of the request you receive not what the simulator show you.
but it's under originalRequest.data.user.accessToken.
if you are using NodeJS you don't need to parse anything you will just need to call :
getUser().accessToken
from ApiAiApp object in the actions-on-google node library.
Related
I use the version 9.0 of the Grapph API. The leads retrieval was wroking ok, but the last 3 weeks I am not able to retrieve lead form information, using the endpoint :
https://graph.facebook.com/v9.0/${leadId}/?access_token=${process.env.FACEBOOK_PAGE_ACCESS_TOKEN}
The page access token as well as the facebook app has all the permissions like leads_retrieval, pages_manage_ads, pages_manage_metadata, pages_read_engagement, business_management, public_profile, pages_show_list.
When I create a lead form id from the page that is connected to the app, and then use the testing tool (https://developers.facebook.com/tools/lead-ads-testing) to check if the webhook works, everything works ok !!
The facebook and the connected page that are connected and were used for testing purposes, do belong in different businesses.
The problem is that when someone submits a lead from paid campaigs, then the following error message shows:
An invalid response was received from the Facebook API: {"error":{"message":"Unsupported get request. Object with ID '1223289864932223' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api","type":"GraphMethodException","code":100,"error_subcode":33,"fbtrace_id":"AIQ5Q-yJo249IZwdn10dfhi"}}
Is there an error in the set up of the whole system? Something that needs to be changed? Why suddenly did it stop working ?
I have created a Google assistant application which is connected to Dialog Flow project.
And the I have deployed it as Alpha release and tried to test it with mobile phone.
The issue I'm facing is all the responses from the application is duplicated, but when I
test it from the Action Console simulator or from Dialog flow it works fine.
Tried deleting and recreating the google project but to no avail.
In your intent on dialogueflow can you check under Responses if the Google Assistant action is un-toggled?:
Use responses from the DEFAULT tab as the first responses
Alternatively you can try deleting your default responses and set only the Google Assistant action. Possibly the intent's Default and Google Assistant response are sending both responses to dialogflow causing duplicate response.
1) Is setting up webhook necessary to save json data of a context shared between players of context?
2) How to validate callback url for webhook on facebook developer console? My game is already live on facebook for single player. (No local testing)
3) Can I use my own personal https url to setup webhook?
No, you do not need to use the webhook to save context data. You can use XMLHttpRequest, fetch or a JavaScript SDK for a service like Playfab or Firebase to store data. In fact, we wouldn't even recommend you use a webhook for saving data because if the player turns off messages from your bot you will not receive any webhook callbacks.
You can validate a callback URL using the developer dashboard, including the "Show Recent Errors" button, which is really useful for spotting any issues. You can also get more information from the Webhooks item on the left nav.
You may need to clarify what you mean by "your own personal https url". As long as Facebook can hit your webhook URL, everything will work. You cannot, for example use a localhost URL.
I am working on dialogflow and actions on Google for Google assistant integration. I have been working on it from last few months, I created dialogflow agent made required changes and setting in actions on Google as well. I used to test each and every day after implementing new features to my app (using Webhook) and found everything well before submitting to apha/beta approval. After completing my work with the app, I just submitted it for alpha/beta approval to Google and they approved it. At this point I just sent the opt in link(provided by actions on Google for alpha users for testing purpose) to the alpha testers. But unfortunately nothing is working as expected. After analyzing I found that all the parameters are always empty in the webhook request sent from dialogflow and intent didn't match as expected. But for me (developer or owner) it works fine, I mean to say alpha/beta versions are not working. The parameters should have the values of matched entity synonyms that have been added/loaded to dialogflow dynamically via dialogflow V2 APIs. It is working fine with owner account or developer account, But not with alpha/beta release.
While checking via postman if the entities gets loaded to dialogflow or not i found entities were loaded successfully to dialogflow with the same dialoflow V2 api, But due some reasons webhook request always sends empty strings for parameters.
Can any one have any idea why is this happening, And what is the solution for this issue?
Thanks in advance.
I have faced the same issue. And I found that my google actions are in deploying state and I have tried to test it with an opt-in link. But After a few hours, it is deployed properly and my custom google actions worked fine. And you also need to do alpha testing enabled in your mobile from an opt-in link.
I have a Actions on Google project that uses api.ai for its actions. This is working well and I can see request/responses appear on the google assistant interface (On mobiles and simulator)
One of my usecases for api.ai needs to broken into 2 parts, in that we have to inform the user that the processing has started and then inform them again once its completed (without them reprompting for the output).
Im trying for a way to inform the user who is using the Google assistant when the processing is completed, but have failed so far. Something like this
User: I would like to see if my loan request is approved
Google Assistant: Hold on, let me check and let u know .
.... (Makes a webservice call to the backend asynchronously)
.... After few seconds ...
.... Postback to google assistant from the webservice
Google Assistant: Thanks for holding, your request is approved.
Im not sure how to do the "postback to google assistant" call. I have tried to get the SessionId from the Api.AI call and then use that to make a event request , but that doesnt seem to send the response to the assistant. Google Assistant seems to be using the formats defined in https://developers.google.com/actions/reference/rest/Shared.Types/AppRequest, but Im unsure how to get the ConversationToken and use that for sending the response back to the user.
Short answer: you can't do that.
Slightly longer answer: At least right now, there is no good way to send a notification. Your Action can only respond to a specific statement from the user. You can say something like "ask again in a minute and I should have a result for you", but that isn't a great experience. At Google I/O 2017, they announced that notifications would be coming to the Google Home at some point... but gave neither a time frame nor any information about an API.
Long, but probably still unsatisfying answer: You can look into Transactions which let them initiate purchase or request of some sort and then "check out". Once they have checked out, you would confirm that a transaction is being processed with an OrderUpdates and then can send updates with the status of the "order". These status updates can turn into notifications or user's can query the state of the order at any time. Transactions don't require payment, so this may work depending on your needs.
However, there are a few things to note. This is still in developer preview, so things may change in the future. It also doesn't work on all surfaces where the Assistant runs, so while it does work on Assistant on phones, it does not work on the Google Home right now.