I've created a "conversational app" on Google's Dialogflow (formerly API.AI), integrated it with Google Assistant via Integrations > Google Assistant > Test, and successfully triggered intent from my (account linked) Google Home.
I need to perform testing long term, but the test preview only seems to last for 30 minutes - 24 hours. I can refresh this preview in Actions on Google via Overview > Test Draft. I need a way to automate this refresh process, keeping the preview test available to my linked Google Home for extended period of time, e.g., several days or weeks.
I've successfully imitated the XHR request made from Actions on Google to request the new Test Draft using Postman with my current session cookies and the request's header and content:
POST https://console.actions.google.com/u/0/m/actions/agents/draft/createlocalizeduserpreview
Cookies: 1P_JAR, APISID, HSID, NID, OGPC, OSID, OTZ, S, SAPISID, SID, SIDCC, SSID
Headers:
Content-Type:application/x-www-form-urlencoded
x-framework-xsrf-token:abcabcabcabc:1520203076726
x-client-data:abcabcabc==
user-agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36
referer:https://console.actions.google.com/u/0/project/logvital-baa11/simulatorcreate
origin:https://console.actions.google.com
Body:
projectNumber=123412341234&selectedLocale=en
If anyone has recommendation on how to automate the authorization step (i.e. to get authorized session cookies), this request could then be sent via automation such as cron task.
For additional context / reference, here are some previous (now non-working) solutions and posts:
Make google actions development project preview persist longer
Can I develop a private action only accessible via my google home or linked account?
https://discuss.api.ai/t/permanent-preview-of-actions-in-google-home/2707
https://discuss.api.ai/t/timeout-in-google-integration-preview/3742/2