I upload my google action file via Gactions CLi but is there any way to upload google action' action.json file via API.?
I don't know what exactly you are trying to say, but I have tried to figure out and answer.
I think you are trying to ask us about how to upload JSON file in api.ai? If yes then you have to follow these steps.
1. Go to api.ai
2. Click on 3 dots beside create intent option.
3. Click on upload intent. [1]: https://i.stack.imgur.com/F08mt.jpg
4. Choose file and upload.
There's one more method.
1. Go to settings of your agent.
2. Go to export/import
3. Click import from zip
4. Select your zip file and upload it.
Yes you can do it by coding. You just need to use the Dialogueflow client api.
For more information please refer below link.
https://developers.google.com/api-client-library/java/apis/dialogflow/v2
Related
At this website
https://cloud.google.com/life-sciences/docs/how-tos/getting-started#download_credentials_for_api_access
it says:
After creating your credentials, download the client_secret.json file by going to the Credentials page in the Cloud Console and clicking Download JSON file_download.
The credentials page is hyperlinked. But when you go to that page there is no such button named download json file. Here is a screenshot of the page:
I really wish Google would learn to write clear documentation.
I should also add that the website has the following cryptic instructions:
Use this key in your application by passing it with key=API_KEY parameter.
I don't know what it means to pass a key. If the writers would have provided an example that would certainly have helped. I have the key and that might solve my problem, I just don't know what to do with it.
This may be late, but this may help if anyone is still having this issue
After creating the service account
Select/click the from the account listing
Goto the keys tab
Click Add Key and select create key
Then select JSON and the file will be downloaded
refer here https://cloud.google.com/docs/authentication/getting-started?authuser=1#creating_a_service_account
You haven't made a OAuth credential.
Click Create credentials > Oauth Client ID.
Set the application type to Other and complete the form.
After creating your credentials, download the client_secret.json file by going to the Credentials page in the Cloud Console and clicking Download JSON file_download. Securely store the file in a location that only your application can access.
The write of the documentation linked to the wrong page. He should have linked to
https://console.cloud.google.com/apis/credentials/
But instead linked to
https://console.developers.google.com/apis/credentials
If you can download the json file with the first link then more instructions will be needed. The second link though allows you to download the json file.
After creating the keys and service account, you can download the Json file on the end right side of OAuth key IDs. Check the picture below for the location of the button.
I am creating a Google Action's project using a Flash Card template. I am following the steps from google documentation. But after updating the questions and answers, and other required field I am not able to upload contents from my sheet to google actions console like the documentation does in step 14.
After clicking on Upload in Step 13, I see a success message saying check_circleYour content was uploaded successfully, 35 rows of content were detected but when I click on Create App after that I see the following messages.
This is the error I see everytime I click on Upload
This was due to a bug that has been resolved.
I want to make google voice actions app for my Google Home. But, based on quick research, as of Dec 11, google does not allow private projects for Google Home.
References:
Can I develop a private action only accessible via my google home or linked account?
How can I run my development action on my Google Home?
I understand that I can preview the app from API.ai project, and it deployes to the linked Google Home device.
But the issue is, the deployed app does not persist. It is no longer available after hour or so.
How can I make it permanent (if there is a way)?
UPDATE
Based on Leon's answer, I just wanted to extend the steps on how to enable the sample for 24 hours.
Click on the "Google Home Web Simulator" link on bottom right corner.
Then you will be presented with google home device - click on "Start" button on that page
On next page, top right corner you have the "ACTION PACKAGE" button Leon is talking about. Click on that and extend expiration time by clicking on "Preview for 24 hours" button. See screenshot below:
I have found a way to create the Action on API.ai and then preview it indefinitely.
From API.ai:
Open browser dev console (Network tab)
Go to Integrations
Turn on "Actions on Google" integration
Click "Authorize"
Click "Preview"
Inspect the XHR response from https://console.api.ai/api/agent/googleassistant/preview in the Network dev console
{
"status":{
"code":401,
"errorType":"unauthorized",
"errorDetails":"You are not authorized for this operation. ",
"webhookTimedOut":false
}
}
Copy/paste the content of the response into a file called action.json
Then, download and install the gactions CLI from here - gactions CLI and then run this command:
gactions preview --action_package action.json --preview_mins 9999999 \
--invocation_name [your_own_invocation_name_here]
The preview_mins value of 9999999 makes the preview effectively indefinite.
Here is a video demonstrating it:
As of today, May 17 2017, the highest voted answer to this question no longer works for new API.ai projects due to the upgrading of the Actions on Google SDK to v2. A similar methodology to #Brady's answer does work still, but they've made it more difficult in some ways (more information needs to be provided to Google, globally unique invocation name despite being a local only test), and better in others (gactions CLI docs now explicitly state that indefinitely timed previews are accepted, and actually is the default if not provided as a argument to the gactions test call).
Create your API.ai agent as normal.
Under the "Integrations" side menu, open the "Actions on Google" settings.
Select "Test" from the bottom of the dialog box that appears (you may need to jump through a few hoops here, signing in, authorizing account access, etc.)
This is where it gets a little different. You now need to create a project on the Actions on Google console. Create or import a project to the console.
The first required step is to supply an action package, which can come from either API.ai or the SDK directly. For API.ai, you have to go back to the Integrations page we were at and press "Update" on your Actions on Google settings. (On the previous version of the SDK, this was labeled "Deploy" and would have made your app public, but don't worry - all this does now is update the AoG console. You publish publicly from the AoG console later if desired).
This new console requires more information outright than was necessary before. I found that the "Assistant app name" can be whatever you want, but the "Pronunciation" is strictly limited to a few conditions (globally unique, reserved keywords, non-brand violating). I also found that I could still invoke using the app name and not just the pronunciation, but I suspect that will be fixed.
Once you've filled out all the necessary information, you can test
from API.ai. Return to the AoG settings menu in API.ai and retrieve
the response content from the HTTP request preview (just like in
#Brady's answer above). Here we hit another difference. The content
of the request response can't be used directly in the action.json
file as it is wrapped in another object. You want to use only the
object from the property actionPackage. (i.e. remove
{
"actionPackage":
from the beginning of the content and
}
from the end). You should end up with a object of a structure similar
to this (but maybe not exactly, it depends on the content of your
API.ai agent):
{
"actions": [...],
"types": [...],
"manifest": {...},
"conversations": {...}
}
Put this into your action.json file.
Execute the new gactions CLI command:
gactions test --project <your_project_name_from_aog_console> --action-package action.json
Enjoy your local v2 Actions on Google SDK project! And pray Google does not alter the deal any further...
I tried my best to recall what I had to do from memory, so there may be some mistakes in this write up. Hopefully this helps someone.
You can extend the time the development action can be previewed on the web simulator or Google Home device. After you preview the action from API.AI, click on the list of action packages in the web simulator. Then select the "Preview for 24 hours" link for your action package.
I downloaded the tarball from the IndexTank JQuery Github page and extracted the archive as the instructions told me to.
I edited the test.html file and added my IndexTank public API URL and also my index name as per the instructions.
Then I opened the test.html file in Chrome and tried to use the search field.
So, my question is this:
Why, everytime I search for something, am I prompted with a browser popup asking me to enter in my username and password?
You need to go to your dashboard, click on Manage for your index and enable Public Search API. The option is right below the scoring functions.
I've recently got into using FireBreath for some simple task: download a clicked url. Is there a built-in method or something else with which i can add the url to Chrome's native download queue? or at least load up a Save Link As.. dialog (that would be ok too)?
You can show a save dialog by using the native OS calls to do so; for example, on the Mac you'd use NSSavePanel. That won't hand the download off to the browser though, it would just give you a user-selected filename to download to. You'd still have to do the download yourself.
NPAPI doesn't have a way to tell the browser to start a download using its UI. That would be something that would be an extension API if it existed (and what you'd want to file a request for if it didn't), not part of NPAPI.
Send the following HTTP header along with the content.
Content-Disposition: attachment
Optionally with ; filename="filename here".
If you want to download a clicked URL with FireBreath then you're not going to get a download dialog; if you need a download dialog, why are you using FireBreath?
The easiest way to get a download dialog is to set window.location to the URL you want to download and wait for the browser to pop the dialog up itself; you can do this with FireBreath or with javascript, it works the same way.