Page Summary
-
The Apk resource provides information about an APK, including its version code and binary details.
-
The ApkBinary resource represents the binary payload of an APK and includes SHA1 and SHA256 hashes.
-
Methods for interacting with APKs include adding externally hosted APKs, listing current APKs, and uploading APKs.
-
Common error codes include 5xx for server errors and 409 for concurrency update errors.
Resource: Apk
Information about an APK. The resource for ApksService.
| JSON representation |
|---|
{
"versionCode"
:
integer
,
"binary"
:
{
object (
|
| Fields | |
|---|---|
versionCode
|
The version code of the APK, as specified in the manifest file. |
binary
|
Information about the binary payload of this APK. |
ApkBinary
Represents the binary payload of an APK.
| JSON representation |
|---|
{ "sha1" : string , "sha256" : string } |
| Fields | |
|---|---|
sha1
|
A sha1 hash of the APK payload, encoded as a hex string and matching the output of the sha1sum command. |
sha256
|
A sha256 hash of the APK payload, encoded as a hex string and matching the output of the sha256sum command. |
Methods |
|
|---|---|
|
Creates a new APK without uploading the APK itself to Google Play, instead hosting the APK at a specified URL. |
|
Lists all current APKs of the app and edit. |
|
Uploads an APK and adds to the current edit. |
Error codes
The operations of this resource, return the following HTTP error codes:
| Error code | Reason | Description | Resolution |
|---|---|---|---|
400
|
invalidValue
|
An invalid value was provided in the request. This is often returned for a malformed or invalid purchase token. | Correct the invalid field value in the request body or parameters based on the API reference. |
400
|
required
|
A required field or parameter is missing from the request. | Consult the API documentation to ensure all mandatory fields and parameters are included. |
403
|
userInsufficientPermission
|
The user does not have sufficient permission to perform the requested operation. | Ensure the authenticated user has the necessary permissions in the Google Play Console. See Using a service account for more details. |
404
|
notFound
|
The requested resource could not be found. | Verify the identifiers (e.g., purchase token, package name, product ID, subscription ID) are correct. |
409
|
concurrentUpdate
|
There was an attempt to update an object that is being updated concurrently. | Retry the request with exponential backoff. Avoid simultaneous modifications to the same resource. |
5xx
|
Generic error
|
Generic error in the Google Play server. | Retry your request. If the problem persists contact your Google Play account manager or submit a support request. Consider checking the Play Status Dashboard for any known outages. |

