How do I download files using a User Token instead of an Application Token?

  • 39
  • 1
  • Question
  • Updated 9 months ago
  • Answered
Hello. I sometimes write scripts that manipulate QuickBase record attachments from outside of quickbase. Usually just like a "curl" request from the command line.
In the past the instructions outlined here have worked very well. I just get an API ticket from API_Authenticate (using my username and password):,

then run a command like this from the terminal:

curl<authentication_ticket_from_API_Authenticate> > Desktop/mydownload.pdf

And the file in question appear in mydownload.pdf on my Desktop

BUT HERE'S THE PROBLEM: I'm trying to use User Tokens now, since they're just much nicer and easier to keep track of, but as far as I can tell there is no way to get an authentication ticket when exclusively using User Tokens for authentication. For example, running something like:<my_user_token>

gives me a message that "User token is invalid" (despite the fact that it is a known working user token). Running the following API_Authenticate call in order to try to get a ticket from the user token:<my_user_token>

gives me the following error:


  <errtext>Insufficient permissions</errtext>
  <errdetail>You don't have sufficient permissions to access that page. User Tokens cannot be used to call this API</errdetail>

And this is a token that is associated with an account that has full access to the app, so I am confident it's not a permissions thing.

Are there any potential workarounds to this?
Photo of Shaund Grey

Shaund Grey

  • 80 Points 75 badge 2x thumb

Posted 2 years ago

  • 39
  • 1
Photo of Chuck Grigsby

Chuck Grigsby

  • 2,100 Points 2k badge 2x thumb
I think you need to create an apptoken.
Photo of Shaund Grey

Shaund Grey

  • 80 Points 75 badge 2x thumb
I have tried that - when I run this:

It just takes me to a quickbase sign-in page. When I try to get an application ticket using an apptoken, like so:

I get an error message telling me that I "must specify a valid username and password or a valid ticket to use API_Authenticate"
User tokens are a substitute for authentication, as well as the apptoken.  You need to assign the user token to the app you want to access. You don't need to authenticate to the app to use api calls - as long as you have the user token in the parameters...
Here's a complete write up on user tokens:
Good luck..
Photo of Shaund Grey

Shaund Grey

  • 80 Points 75 badge 2x thumb
Thank you. I've checked, and I do indeed have the user token assigned to the app that i want to download files attachments from.

Now that I have that, how do I download files from the app using it?
Photo of Daniel


  • 178 Points 100 badge 2x thumb
I can confirm that the usertoken query param does work when using the URL for a file attachment returned from a doQuery operation.

Not sure this helps for your use case.
Hello Daniel, 

I'm trying this<mysusertoken>;  in an HTPP request, GET method and is not working for me.  If I try without the user token is redirecting me to a sign in page. Could you please specify a bit more how are doing it using doQuery operation? I've just read in the API GUIDE, API_DoQuery section that 'Field types as File Attachment can't be used as a query's matching value' 

An example or any help will be much appreciated.

Kind regards
Hello again,

Forget about my last comment I made it work. The problem was I forgot to add the user token to the
right application.

I confirm this works using http request and get method<mysusertoken>

Kind regards,