keyFile - Google Assistant Transactions

google-assistant

#1

I am working on Google Digital Subscriptions.

Currently, I have implemented the following code in my LAUNCH function:

    const subscriptions = await this.$googleAction.$transaction.getSubscriptions("subscriptionID")
    console.log(subscriptions);
    this.tell('ok');

I am receiving the following error:
Please add a valid keyFile object to the GoogleAssistant transaction config

I found this snippet in Jovo Examples.

Where do we find keyFile.json?

image

What is this keyfile?

I do not see any mention of it in Jovo docs.


#2

I may have found the answer on Google Assistant Docs:

https://developers.google.com/assistant/transactions/digital/dev-guide-digital-subscriptions#1

  1. In the Actions console, click the three dots icon in the upper-right corner, then Project settings.
  2. Find your Action’s Project ID .
  3. Follow this link, replacing " <project_id> " with your project’s ID: https://console.developers.google.com/apis/credentials?project=project_id
  4. In the main navigation, go to Credentials .
  5. On the page that appears, click Create credentials , then Service account key .
  6. Go to Service Account , and click New Service Account .
  7. Give the service account a name like digitaltransactions.
  8. Click Create .
  9. Set the Role to Project > Owner .
  10. Click Continue .
  11. Click Create Key .
  12. Select the JSON key type.
  13. Click Create key and download the JSON service account key.

Giving this a try now…


#3

Take a look at the official Google Docs: Create a digital goods API key