0

I am working on a skill. I would like to check if the voice using the skill is the one registered on the device. Something like what @prisoner mentions here:

How to get user's unique identity from google home's voice match profile?

But looking at the docs for V2 it seems to be deprecated?

https://developers.google.com/actions/identity/user-info

Can someone confirm if this is right or how I can do this using V2 of actions on google SDK (with or without account linking)

rudy750
  • 23
  • 3
  • The page you linked to provides migration guidance – Robert Levy Apr 14 '19 at 15:29
  • https://developers.google.com/actions/identity/user-info#migrating_to_webhook-generated_ids it says: `// if a value for userID exists un user storage, it's a returning user so we can // just read the value and use it. ` is that the same as : ` If a voice matches a registered voice profile on the device, a consistent user ID is returned. ` – rudy750 Apr 14 '19 at 15:39

1 Answers1

0

Yes, the method outlined on the SO answer you linked to has been deprecated, and will be removed in May 2019. (I'm now on my way to that page to update that answer as well.)

You can determine if a user is a returning user in one of several ways, depending on your exact needs.

  • The first time a user visits, you can put a unique ID in the user storage. If the value is there in the future, you know it is a return visit. This is not foolproof (user's can view and delete the contents of the user storage) and there may be legal restrictions on this based on your jurisdiction.

  • Similarly, the system will also tell you the last time the user has visited.

  • The most reliable way is to use Account Linking with Google Sign-In

Prisoner
  • 49,922
  • 7
  • 53
  • 105
  • Yeah. I was hoping to use Identify the registered user of the Home device as a way of authorizing certain actions on my skill. If you own the device you can hear this information. If you are a house guest or maybe a child you are not allowed to perform certain transactions. – rudy750 Apr 15 '19 at 19:30
  • That is best done with Google Sign-In, since it ties it directly to an account. – Prisoner Apr 15 '19 at 19:45