Data

Learn more about how to get access to user information.

Introduction

User information is mainly used to offer a more personalized experience, but you can't access it right away. First you have to ask for permission.

ON_PERMISSION

After the user has answered your request, they will be redirected to the ON_PERMISSION intent, if availabe, where you can access and store the data.

Name

You can get access to the user's given name, family name and display name.

Location

Get access to the user's location. Depending on the device the request comes from and the permission you have, you can get access to different data.

If it's a phone, you can only access the latitude and longitude with the DEVICE_PRECISE_LOCATION permission.

On a voice-enabled speaker you can access all of the data, depending on the permission you have.

Official Documentation

Example

Account Linking

The account linking card is used to prompt the user to connect their Google account to an account on your service.

The user will be routed to the ON_SIGN_IN intent after they answered the account linking request.

To check, if the user has already signed in, you can use the getSignInStatus() method. It will either return OK, CANCELLED or ERROR.

Official Documentation

Example

Comments and Questions

Any specific questions? Just drop them below. Alternatively, you can also fill out this feedback form. Thank you!

Join Our Newsletter

Be the first to get our free tutorials, courses, and other resources for voice app developers.