Google Play Android Developer API . appsigning

Instance Methods

close()

Close httplib2 connections.

enrollApp(name, body=None, x__xgafv=None)

Enrolls an app in Play App Signing using a self-hosted Google Cloud KMS key. Warning: Do not use this method for standard Play App Signing enrollment. * Standard enrollment with Google-generated or Google-managed keys cannot be done via API. * This advanced API is strictly for enterprise organizations with mandatory compliance, regulatory, or policy requirements to retain key custody in an external Google Cloud KMS instance. * Prerequisites: Requires an active, properly configured Google Cloud KMS key with appropriate IAM permissions granted to Google Play before calling this method. See Help Center: https://support.google.com/googleplay/android-developer/answer/9842756

rotateAppSigningKey(name, body=None, x__xgafv=None)

Rotates an app's signing key to a new self-hosted Google Cloud KMS key. Warning: This method only applies to apps enrolled with self-hosted Cloud KMS keys. For apps using standard Google-managed Play App Signing, key rotation requests must be initiated through the Google Play Console UI. See Help Center: https://support.google.com/googleplay/android-developer/answer/9842756

Method Details

close()
Close httplib2 connections.
enrollApp(name, body=None, x__xgafv=None)
Enrolls an app in Play App Signing using a self-hosted Google Cloud KMS key. Warning: Do not use this method for standard Play App Signing enrollment. * Standard enrollment with Google-generated or Google-managed keys cannot be done via API. * This advanced API is strictly for enterprise organizations with mandatory compliance, regulatory, or policy requirements to retain key custody in an external Google Cloud KMS instance. * Prerequisites: Requires an active, properly configured Google Cloud KMS key with appropriate IAM permissions granted to Google Play before calling this method. See Help Center: https://support.google.com/googleplay/android-developer/answer/9842756

Args:
  name: string, Required. Either package name or app ID of the app enrolling in Play Signing. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request to enroll an app into Play App Signing using a self-hosted Cloud KMS key.
  "enrollExistingApp": { # Enroll an existing app into Play signing. # Enrolls an existing app into Play signing using an external Cloud KMS key.
    "cloudKmsKey": { # Reference to a private key hosted in developer-managed Google Cloud KMS. # Required. Self-hosted key. Once enrolled, this key will be used to sign your app.
      "cryptoKeyVersionResource": "A String", # Required. Resource identifier of the private key hosted in Google Cloud KMS. The Google Play service account must be granted Decrypt and Sign permissions on this resource. Format: projects//locations//keyRings//cryptoKeys//cryptoKeyVersions/
    },
  },
  "enrollNewApp": { # Enroll a new app into Play signing. # Changes the signing key of a new app to an external Cloud KMS key. The app must not have published to Open testing or Production tracks.
    "cloudKmsKeyAndCert": { # Cloud KMS key and the certificate associated with the key. # Required. Self-hosted key. Once enrolled, this key will be used to sign your app.
      "cloudKmsKey": { # Reference to a private key hosted in developer-managed Google Cloud KMS. # Required. Cloud KMS key.
        "cryptoKeyVersionResource": "A String", # Required. Resource identifier of the private key hosted in Google Cloud KMS. The Google Play service account must be granted Decrypt and Sign permissions on this resource. Format: projects//locations//keyRings//cryptoKeys//cryptoKeyVersions/
      },
      "pemCertificate": "A String", # Required. Certificate associated with the key. The bytes must contain the certificate in PEM format.
    },
  },
  "pemUploadCertificate": "A String", # The certificate associated with the upload key, in PEM format.
}

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

Returns:
  An object of the form:

    { # Response to enroll an app into Play signing.
  "signingCertificate": { # Hash digests of a certificate. # The signing certificate hashes for the app. Always set.
    "certificateHashMd5": "A String", # Hex-encoded MD5 hash of the certificate. example: `43:51:43:A1:B5:FC:8B:B7:0A:3A:A9:B1:0F:66:73:A8`
    "certificateHashSha1": "A String", # Hex-encoded SHA1 hash of the certificate. example: `86:61:97:1A:D5:EF:E5:74:1E:A7:5B:84:7C:68:37:65:CD:94:16:DE`
    "certificateHashSha256": "A String", # Hex-encoded SHA256 hash of the certificate. example: `94:49:C7:F3:A9:3C:F0:C5:5A:67:5D:DF:1C:83:73:2D:87:D5:62:55:E7:0B:15:0D:9E:6F:3C:F8:63:BB:7F:C1`
  },
  "uploadCertificate": { # Hash digests of a certificate. # The upload certificate hashes for the app. Set iff pem_upload_certificate was set in the request.
    "certificateHashMd5": "A String", # Hex-encoded MD5 hash of the certificate. example: `43:51:43:A1:B5:FC:8B:B7:0A:3A:A9:B1:0F:66:73:A8`
    "certificateHashSha1": "A String", # Hex-encoded SHA1 hash of the certificate. example: `86:61:97:1A:D5:EF:E5:74:1E:A7:5B:84:7C:68:37:65:CD:94:16:DE`
    "certificateHashSha256": "A String", # Hex-encoded SHA256 hash of the certificate. example: `94:49:C7:F3:A9:3C:F0:C5:5A:67:5D:DF:1C:83:73:2D:87:D5:62:55:E7:0B:15:0D:9E:6F:3C:F8:63:BB:7F:C1`
  },
}
rotateAppSigningKey(name, body=None, x__xgafv=None)
Rotates an app's signing key to a new self-hosted Google Cloud KMS key. Warning: This method only applies to apps enrolled with self-hosted Cloud KMS keys. For apps using standard Google-managed Play App Signing, key rotation requests must be initiated through the Google Play Console UI. See Help Center: https://support.google.com/googleplay/android-developer/answer/9842756

Args:
  name: string, Required. Either package name or app ID of the app rotating the signing key. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request to rotate an app's signing key.
  "keyRotationReason": "A String", # Required. Reason for rotating the app key.
  "rotatedCloudKmsKey": { # Message representing rotated Cloud KMS key. Consists of the Cloud KMS key and its associated proof of rotation. # Required. Self-hosted Cloud KMS key.
    "cloudKmsKeyAndCert": { # Cloud KMS key and the certificate associated with the key. # Required. Cloud KMS key and the certificate associated with the key.
      "cloudKmsKey": { # Reference to a private key hosted in developer-managed Google Cloud KMS. # Required. Cloud KMS key.
        "cryptoKeyVersionResource": "A String", # Required. Resource identifier of the private key hosted in Google Cloud KMS. The Google Play service account must be granted Decrypt and Sign permissions on this resource. Format: projects//locations//keyRings//cryptoKeys//cryptoKeyVersions/
      },
      "pemCertificate": "A String", # Required. Certificate associated with the key. The bytes must contain the certificate in PEM format.
    },
    "signingCertificateLineage": "A String", # Required. Proof-of-rotation. See [creating signing certificate lineages](https://developer.android.com/studio/command-line/apksigner#rotate_signing_keys_2).
  },
}

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

Returns:
  An object of the form:

    { # Response to rotate an app's signing key.
  "rotatedKeyCertificate": { # Hash digests of a certificate. # The rotated key certificate hashes for the app. Always set.
    "certificateHashMd5": "A String", # Hex-encoded MD5 hash of the certificate. example: `43:51:43:A1:B5:FC:8B:B7:0A:3A:A9:B1:0F:66:73:A8`
    "certificateHashSha1": "A String", # Hex-encoded SHA1 hash of the certificate. example: `86:61:97:1A:D5:EF:E5:74:1E:A7:5B:84:7C:68:37:65:CD:94:16:DE`
    "certificateHashSha256": "A String", # Hex-encoded SHA256 hash of the certificate. example: `94:49:C7:F3:A9:3C:F0:C5:5A:67:5D:DF:1C:83:73:2D:87:D5:62:55:E7:0B:15:0D:9E:6F:3C:F8:63:BB:7F:C1`
  },
}