Forum Discussion

ChadCox's avatar
ChadCox
Qrew Trainee
5 years ago

API Call to Download CSV file using Usertoken

I need help converting this URL that allows my users to access a CSV file into another version of the URL using API_GenResultsTable. The first URL below works only when my users accessing it are logged in to QuickBase.

https://company.quickbase.com/up/babcd/a/r5161/e9/va​

I need to access this same CSV resport via the API and get my browser to download a CSV report. I am trying to use something like this, but it only downloads an empty report. I am thinking it is because I don't know how to provide the "RID" (Record ID). 

https://company.quickbase.com/db/babcd?a=api_genresultstable&qid=39&options=csv&usertoken=abc123​

The first URL looks like it specifies the database (babcd) in my case, and provides the record ID (r5161). I am not sure what e9 and va are. 

This question is similar to https://community.quickbase.com/communities/community-home/digestviewer/viewthread?GroupId=103&MID=33442&CommunityKey=d860b0f8-6a48-487b-b346-44c47a19a804&tab=digestviewer, but different in what is requested. I need the record ID.

Any idea on how to convert URL 1 into the format of URL 2 so I can provide my usertoken as authentication?

Thanks.

------------------------------
Chad Cox
------------------------------

2 Replies

  • The syntax to a link to download a file would be this

    URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e7/v0

    In the example above, the field ID holding the file attachment is fid 7.

    If you check a box on the file attachment field properties, you will not need to Authenticate to download the file.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------
    • ChadCox's avatar
      ChadCox
      Qrew Trainee
      Thanks Mark!  That is great help.  I was unaware of the ability to check the box on the file attachment properties. I appreciate the quick help!

      ------------------------------
      Chad Cox
      ------------------------------