Google Play Integrity API . v1

Instance Methods

close()

Close httplib2 connections.

decodeIntegrityToken(packageName, body=None, x__xgafv=None)

Decodes the integrity token and returns the token payload.

Method Details

close()
Close httplib2 connections.
decodeIntegrityToken(packageName, body=None, x__xgafv=None)
Decodes the integrity token and returns the token payload.

Args:
  packageName: string,  Package name of the app the attached integrity token belongs to. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request to decode the integrity token.
  "integrityToken": "A String", # Encoded integrity token.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response containing the decoded integrity payload.
  "tokenPayloadExternal": { # Contains basic app information and integrity signals like device attestation and licensing details. # Plain token payload generated from the decoded integrity token.
    "accountDetails": { # Contains the account information such as the licensing status for the user in the scope. # Required. Details about the Play Store account.
      "accountActivity": { # Contains a signal helping apps differentiating between likely genuine users and likely non-genuine traffic (such as accounts being used for fraud, accounts used by automated traffic, or accounts used in device farms) based on the presence and volume of Play store activity. # Details about the account activity for the user in the scope.
        "activityLevel": "A String", # Required. Indicates the activity level of the account.
      },
      "appLicensingVerdict": "A String", # Required. Details about the licensing status of the user for the app in the scope.
    },
    "appIntegrity": { # Contains the application integrity information. # Required. Details about the application integrity.
      "appRecognitionVerdict": "A String", # Required. Details about the app recognition verdict
      "certificateSha256Digest": [ # The SHA256 hash of the requesting app's signing certificates (base64 web-safe encoded). Set iff app_recognition_verdict != UNEVALUATED.
        "A String",
      ],
      "packageName": "A String", # Package name of the application under attestation. Set iff app_recognition_verdict != UNEVALUATED.
      "versionCode": "A String", # Version code of the application. Set iff app_recognition_verdict != UNEVALUATED.
    },
    "deviceIntegrity": { # Contains the device attestation information. # Required. Details about the device integrity.
      "deviceRecognitionVerdict": [ # Details about the integrity of the device the app is running on
        "A String",
      ],
    },
    "guidanceDetails": { # Contains guidance details about the Integrity API response, providing additional context to the integrity verdicts. # Additional guidance related to the integrity API response.
      "userRemediationDetails": [ # This shows when there is an issue with at least one of the integrity verdicts, which can be remedied by the user and provides additional details.
        { # Contains details of remediation guidance that the user can perform. See go/pia-interstitials-dd
          "remediation": "A String", # Description of the user remediation action. Required.
        },
      ],
    },
    "requestDetails": { # Contains the integrity request information. # Required. Details about the integrity request.
      "nonce": "A String", # Nonce that was provided in the request (which is base64 web-safe no-wrap).
      "requestHash": "A String", # Request hash that was provided in the request.
      "requestPackageName": "A String", # Required. Application package name this attestation was requested for. Note: This field makes no guarantees or promises on the caller integrity. For details on application integrity, check application_integrity.
      "timestampMillis": "A String", # Required. Timestamp, in milliseconds, of the integrity application request.
    },
    "testingDetails": { # Contains additional information generated for testing responses. # Indicates that this payload is generated for testing purposes and contains any additional data that is linked with testing status.
      "isTestingResponse": True or False, # Required. Indicates that the information contained in this payload is a testing response that is statically overridden for a tester.
    },
  },
}