ShaundGrey
8 years agoQrew Trainee
How do I download files using a User Token instead of an Application Token?
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:
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:
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:
gives me the following error:
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?
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):,
https://mysite.quickbase.com/db/main?a=API_Authenticate&username=me@mysite.org&password=XXXXXXXXXX
then run a command like this from the terminal:
curl https://mysite.quickbase.com/up/XXXXXXXXX/a/rXXXXX/eXX/v0?ticket=<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:
https://mysite.quickbase.com/up/XXXXXXXXX/a/rXXXXX/eXX/v0?usertoken=<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:
https://mysite.quickbase.com/db/main?a=API_Authenticate&usertoken=<my_user_token>
gives me the following error:
<qdbapi>
<action>API_Authenticate</action>
<errcode>3</errcode>
<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>
<username>me</username></qdbapi>
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?