Discussions

Expand all | Collapse all

How to grant public API access to a field?

  • 1.  How to grant public API access to a field?

    Posted 07-05-2017 16:57
    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. 


  • 2.  RE: How to grant public API access to a field?

    Posted 07-05-2017 18:28
    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


  • 3.  RE: How to grant public API access to a field?

    Posted 07-07-2017 13:53
    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