GET – Download token and download URL of a Build

This request is intended to get the download token of a build and its download URL.

Step 1 - Generate download token #

Params #

Param

Type

Description

type

String

Type of build: auto, file, aab.

  • auto: download .apk (android) or manifest (Apple).
  • file: download .ipa (not the manifest in Apple).
  • aab: download .aab instead of universal .apk

Example request #

				
					curl 'https://api.applivery.io/v1/organizations/_ORGANIZATION_SLUG_/apps/_APPLICATION_ID_/builds/_BUILD_ID_/downloadToken?type=file' 
  -H 'accept: application/json' 
  -H 'authorization: Bearer _BEARERTOKEN_'
				
			

Responses #

Content type: application/json
				
					{
  "status": true,
  "data": {
    "token": "string",
    "expiresAt": "string"
  }
}
				
			
Content type: application/json
				
					{
  "status": false,
  "error": {
    "code": 5014,
    "message": "Build Not Processed"
  }
}
				
			
Content type: application/json
				
					{
  "status": false,
  "error": {
    "code": 4002,
    "message": "No auth token"
  }
}
				
			
Content type: application/json
				
					{
  "status": false,
  "error": {
    "code": 3001,
    "message": "Entity not found"
  }
}
				
			

Step 2 - Get download URL #

Example request #

				
					curl 'https://download-api.applivery.io/v1/download/_DOWNLOAD_TOKEN_' 

				
			

You will be redirected to the URL returned in the location parameter of the response header.

  • In Android, the redirection URL will be the .apk file if the build is a .aab and the download token was generated with the type=aab. In this case, the redirect will be the .aab file.
  • In Apple, the redirection URL will be the manifest.plist if the download token was generated with the type=file. In this case, the redirect will be the .ipa or .pkg file.

 

Responses #

Content type: application/json
				
					{
  "status": true,
}
				
			
Content type: application/json
				
					{
  "status": false,
  "error": {
    "code": 4005,
    "message": "Token Expired"
  }
}
				
			
Content type: application/json
				
					{
  "status": false,
  "error": {
    "code": 3001,
    "message": "Entity not found"
  }
}
				
			
Updated on November 30, 2024
Was this article helpful?

On this page

— talk to an expert —

Talk to an expert

[Contact us] [EN] MDM & MAD
How many devices do you want to manage with Applivery?
Which operating systems do you want to manage?