Mapping user data(such as API keys from third party Platforms) while publishing apps to Google and Alexa

Hi all,

We have our own cloud that lets users configure IoT devices. The implementation of our cloud is such that a microcontroller connects to our cloud, and the users connect their devices(such as LED, ServoMotors, LDRs) to the microcontroller. Then, depending on their use-cases, users configure the microcontroller using our cloud to send signals to their device. As such, a user can have multiple microcontrollers and then connect to our cloud and control their IoT devices. The user gets to write code and have a few GUI options on the cloud to configure the micro-controller based on their requirements.

We want to integrate a voice app into our cloud so that our users can control the IoT devices using voice commands. I was looking into the possibilities of using Voiceflow to design the voice app. Once designed, publish it to Google and Alexa.

Now this Voice app will be published using our account so that users can have access to it via Google Assistant or Amazon Alexa. The pickle we are in is since our cloud has Device IDs and API keys that are unique for each user; is there a way to give our users a way to connect their Google or Alexa account to our Cloud(especially the Device ID and API Key)?

The idea behind this is, we want to give our users a new tab called Voice commands which will list down a few commands they can use, such as the following:

  • Switch {ON/OFF} the Pin {0/1/2/3/4} on device {BOLTXXXXX}

This, in the backend of the voice app, will send an API Post request to our cloud. But it also needs the API key to verify the user.

I believe the above(ON/OFF and 0/1/2/3/4 and BOLTXXXXX) can be implemented using slots and intents within the Voice App in Voiceflow. But how can we insert the API key implicitly based on the user? How can that be implemented?

the most popular way to connect with your service’s accout is account linking.

voiceflow supports account linking for alexa and if your cloud supports OAuth2 authentication, each user can connect amazon account and your cloud account.

this is an old tutorial but you can see the concepts of account link in viiceflow.

for google, vf does not support account linking yet.

Hey @kun432 Thanks for sharing this. I shall try this out with Amazon Alexa.

Any alternatives you know of for doing it with Google as well? any workaround etc?

IMO, I guess the most difficult thing in your use-case is to recognize a long-randome-characters phrase such as API key or DeviceID “via Voice”, right? For Alexa, Account linking can be a solution because users can connect 2 accounts via Alexa app with tap/input their user ID and password for your cloud.

Currently VF does not support account linking for Google, but Google has Google Assitant App for
smartphones and accepts interactions from users “via BOTH” Voice and Text. you can get API key from users’ input and keep it as persistent variable inside of your action. What do you think?

BTW, Alexa app now supports chat, but seems only in US.

Hey @kun432

Thanks for the document on Account Linking with Alexa.

We shall try the account linking on google using this link: Account linking  |  Actions on Google account linking and see if this solves it for the google assistant platform. Will share the findings of it.