- JSON representation
- User
- UserProfile
- PackageEntitlement
- Entitlement
- SignedData
- Device
- Surface
- Capability
- Conversation
- Input
- RawInput
AppRequest is a request sent by the Google Assistant to a fulfillment in order to interact with an Action. The API version is specified in the HTTP header. For API version 1, the header contains: Google-Assistant-API-Version: v1
. For API version 2, the header contains: Google-actions-API-Version: 2
. For examples of how this is used in actions on Google, see https://developers.google.com/assistant/df-asdk/reference/conversation-webhook-json .
JSON representation | |
---|---|
{ "user": { object ( |
Fields | |
---|---|
user |
User who initiated the conversation. |
device |
Information about the device the user is using to interact with the Action. |
surface |
Information about the surface the user is interacting with, e.g. whether it can output audio or has a screen. |
conversation |
Holds session data like the conversation ID and conversation token. |
inputs[] |
List of inputs corresponding to the expected inputs specified by the Action. For the initial conversation trigger, the input contains information on how the user triggered the conversation. |
isInSandbox |
Indicates whether the request should be handled in sandbox mode. |
availableSurfaces[] |
Surfaces available for cross surface handoff. |
User
JSON representation | |
---|---|
{ "idToken": string, "profile": { object ( |
Fields | |
---|---|
idToken |
token representing the user's identity. This is a Json web token including encoded profile. The definition is at https://developers.google.com/identity/protocols/OpenIDConnect#obtainuserinfo. |
profile |
Information about the end user. Some fields are only available if the user has given permission to provide this information to the Action. |
accessToken |
An OAuth2 token that identifies the user in your system. Only available if the user links their account. |
permissions[] |
Contains permissions granted by user to this Action. |
locale |
Primary locale setting of the user making the request. Follows IETF BCP-47 language code http://www.rfc-editor.org/rfc/bcp/bcp47.txt However, the script subtag is not included. |
lastSeen |
The timestamp of the last interaction with this user. This field will be omitted if the user has not interacted with the agent before. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: |
userStorage |
An opaque token supplied by the application that is persisted across conversations for a particular user. The maximum size of the string is 10k characters. |
packageEntitlements[] |
List of user entitlements for every package name listed in the Action package, if any. |
userVerificationStatus |
Indicates the verification status of the user. |
UserProfile
Contains the user's personal info. Fields are only populated if the user user grants the permission to the Action for a particular field.
JSON representation | |
---|---|
{ "displayName": string, "givenName": string, "familyName": string } |
Fields | |
---|---|
displayName |
The user's full name as specified in their Google account. Requires the |
givenName |
The user's first name as specified in their Google account. Requires the |
familyName |
The user's last name as specified in their Google account. Note that this field could be empty. Requires the |
PackageEntitlement
List of entitlements related to a package name
JSON representation | |
---|---|
{
"packageName": string,
"entitlements": [
{
object ( |
Fields | |
---|---|
packageName |
Should match the package name in action package |
entitlements[] |
List of entitlements for a given app |
Entitlement
Defines a user's digital entitlement. Types of possible entitlements: paid-app,in-app purchases, in-app subscriptions.
JSON representation | |
---|---|
{ "sku": string, "skuType": enum ( |
Fields | |
---|---|
sku |
Product sku. Package name for paid app, suffix of Finsky docid for in-app purchase and in-app subscription. Match getSku() in Play InApp Billing API. |
skuType |
|
inAppDetails |
Only present for in-app purchase and in-app subs. |
SignedData
JSON representation | |
---|---|
{ "inAppPurchaseData": { object }, "inAppDataSignature": string } |
Fields | |
---|---|
inAppPurchaseData |
Match INAPP_PURCHASE_DATA from getPurchases() method. Contains all inapp purchase data in JSON format See details in table 6 of https://developer.android.com/google/play/billing/billing_reference.html. |
inAppDataSignature |
Matches IN_APP_DATA_SIGNATURE from getPurchases() method in Play InApp Billing API. |
Device
Information about the device the user is using to interact with the Action.
JSON representation | |
---|---|
{
"location": {
object ( |
Fields | |
---|---|
location |
Represents actual device location such as latitude, longitude, and formatted address. Requires the |
Surface
Information specific to the Google Assistant client surface the user is interacting with. Surface is distinguished from device by the fact that multiple Assistant surfaces may live on the same device.
JSON representation | |
---|---|
{
"capabilities": [
{
object ( |
Fields | |
---|---|
capabilities[] |
A list of capabilities the surface supports at the time of the request e.g. |
Capability
Represents a unit of functionality that the surface is capable of supporting.
JSON representation | |
---|---|
{ "name": string } |
Fields | |
---|---|
name |
The name of the capability, e.g. |
Conversation
JSON representation | |
---|---|
{
"conversationId": string,
"type": enum ( |
Fields | |
---|---|
conversationId |
Unique ID for the multi-turn conversation. It's assigned for the first turn. After that it remains the same for subsequent conversation turns until the conversation is terminated. |
type |
type indicates the state of the conversation in its lifecycle. |
conversationToken |
Opaque token specified by the Action in the last conversation turn. It can be used by an Action to track the conversation or to store conversation related data. |
Input
JSON representation | |
---|---|
{ "rawInputs": [ { object ( |
Fields | |
---|---|
rawInputs[] |
Raw input transcription from each turn of conversation. Multiple conversation turns may be required for actions on Google to provide some types of input to the Action. |
intent |
Indicates the user's intent. For the first conversation turn, the intent will refer to the triggering intent for the Action. For subsequent conversation turns, the intent will be a common actions on Google intent (starts with 'actions.'). For example, if the expected input is |
arguments[] |
A list of provided argument values for the input requested by the Action. |
RawInput
JSON representation | |
---|---|
{ "inputType": enum ( |
Fields | ||
---|---|---|
inputType |
Indicates how the user provided this input: a typed response, a voice response, unspecified, etc. |
|
Union field input . The actual input value input can be only one of the following: |
||
query |
Typed or spoken input from the end user. |
|
url |
The triggering URL. |