GDrive Logo

How to Use Google Drive Hosted Files with StageNow - updated for new Gdrive link format

Ian Hatton -

This blog details a method to convert a Google Drive link so that it can be used in a StageNow profile for downloading files to a Zebra device. The main advantage of this approach is that Google Drive offers 15GB of free storage which can be used to create internet-hosted staging profiles .GDrive also creates links which do not expire (… ) unless you specify an expiry date unlike other file storage providers such as Microsoft OneDrive (which only offers 5GB free storage without a subscription)

  1. Zip the file(s) to be staged to the device before uploading to Gdrive


  1. In Gdrive, create a link to the file via GetLink  , select ‘Anyone with the link’ and copy link


Graphical user interface, text, application, chat or text message</p>
<p>Description automatically generated


  1. The format for exported link is similar to this (fileID is highlighted in yellow):


  1.  Create a Google Drive API key using the method 1 detailed here:

  2. The generic URL format for a direct file download from GDrive is as follows:

    where   FileID= the unique file ID (varies for each file) highlighted in yellow above

                APIKey= your GDrive API key obtained in previous step

6. Create a modified URL using the format above – this will allow direct download of the file linked to this fileID e.g.

Original share link:

Modified share link:


  1. If using a StageNow profile , the modified link can be used directly in the FileMgr Source File URI field to access the file :




  1. If using XML , the link has to be shortened in order to embed it in XML . Copy the link and paste in a URL shortener e.g. to create a short URL e.g.


  1. Copy the short URL for use as the source file in the XML as shown in the examples below:


To unzip the contents of the ZIP file e.g. for APK files, data files etc ( note that zip file contents will be unzipped to the destination folder specified in ArchiveTargetPathAndFolderName )

      <characteristic type="FileMgr" version="10.1" >

        <parm name="FileAction" value="9"/>

    <characteristic type="file-details">

        <parm name="IfDuplicate" value="1" />

        <parm name="ArchiveTargetPathAndFolderName" value="/sdcard/Download"/>

        <parm name="ArchiveSourceURI" value=""/>




When profile is processed the zip file will be downloaded and extracted with status message similar to the following :


Text, letter</p>
<p>Description automatically generated


  1. To transfer the ZIP file ‘as is’ e.g. for OS update files:


<characteristic version="0.6" type="FileMgr">

    <parm name="FileAction" value="1" />

    <characteristic type="file-details">

      <parm name="TargetAccessMethod" value="2" />

      <parm name="TargetPathAndFileName" value="/sdcard/Download/" />

      <parm name="SourceAccessMethod" value="1" />

      <parm name="SourceURI" value="" />




For a full OSUpgrade example please refer to the associated blog post which covers this topic specifically:





Ian Hatton

Please register or login to post a reply

11 Replies

E Emmanuel Beucher

Would this also work for OS upgrade or do we need to have the zip file name in the URL ?

I Ian Hatton

Yes - will work for OS upgrade and downgrade - the filename is not required in the URL as the Gdrive link refers to the specific file which has been shared.

L Luiz Santos

Thanks Ian!! Your article helped me a lot...

T Tran The Cong

hello, i don't know how to download files from sharepoint, my company blocks google driver

I Ian Hatton

This method only works with Gdrive - I have not found an equivalent method which works with Sharepoint links unfortunately

T Tran TheCong


I get the error message "Query Error, Reason-FMC Download Failed!!! No Redirection supported"

Even though I used only the link  in the tutorial article, the network is not blocked from accessing the Google driver link
I am using MC33 android 7

S Simone Torrisi

Hi, for a few days I have no longer been able to use gdrive with StageNow. It has always worked correctly. I attach the image of the message.

I Ian Hatton

The error being reported is due to a change Google made in the format of the direct file download link which now requires the addition of a Gdrive API key. Please refer to the related article here ( ) which has the new link format and I will also update this blog in the next week or so. 

S Simone Torrisi

Thanks Ian for the quick fix; we really appreciated it.

M Michael Engl

Since today I get the below error for downloading files which worked fine yesterday.



Exception, FileAction-Downnload Failed With HTTP Error Code 403



I Ian Hatton

I see the same thing and via a browser I get the message below. Looks like a Gdrive issue so it could be worth opening a support ticket with Google if it does not clear by itself sometime today ?


  "error": {
    "code": 403,
    "message": "The download quota for this file has been exceeded.",
    "errors": [
        "message": "The download quota for this file has been exceeded.",
        "domain": "usageLimits",
        "reason": "downloadQuotaExceeded"