How to grant public API access to a field?

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
  • (Edited)
I am trying to create an email confirmation feature for my Quickbase app. 

The design I had in mind was to send an email to the user once a new record has been created. 
Inside the email is this API call 

 
urlroot() & "db/%dbid%/" & "a=API_EditRecord?rid=%recid%&fid_273=1 


When calling this url with/without any authentications yields 
<qdbapi>
<action>API_EditRecord</action>
<errcode>0</errcode>
<errtext>No error</errtext>
<rid>111</rid>
<num_fields_changed>0</num_fields_changed>
<update_id>1499272930667</update_id>
</qdbapi>
The response indicates no error, but the field I was targeting remains unchanged.

Is there a way I can give public access to the a certain field, in my case a checkbox fid_273? 
I would like the user to verify his/her email by clicking a url and it checking a field in the database. 

thanks. 
Photo of Paul Trimor

Paul Trimor

  • 488 Points 250 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Scott

Scott

  • 314 Points 250 badge 2x thumb
Hi Paul,

For checkboxes, they use TRUE/FALSE instead of 0 and 1.  Try fid_273=true instead.

I'd also add a token to your request, its helpful for tracking activity.

https://excelpkg.quickbase.com/db/<your app id>?a=GetAppDevKey

You'd throw it on with an &token=<your token> in your formula url. 

Scott
Photo of Paul Trimor

Paul Trimor

  • 468 Points 250 badge 2x thumb
Thank you Scott, 

Change the checkbox from true to 1 helped, but the API token allows free usage of all APIs, is there a way I can restrict access to only only using the Edit API on one particular field? 

thanks again,
Paul