Time Stamp Button/Application Token issue

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

I am trying to use a button to "Clock in for day" I am using this formula from the "Employee Scheduling" App. I did change the table and move it into a different app. Now, when I try to click the button, I get an error code about application tokens. How do I supply an application token? 

Here is the formula:

If(IsNull([Actual Start Time]),

URLRoot() & "db/" & Dbid() & 

"?a=API_EditRecord&rid="& [Record ID#]

& "&_fid_16=" & 

URLEncode (Now())

&"&rdr=" & URLEncode(URLRoot()& "db/" 

& [_DBID_SCHEDULES] & "?a=dr&rid=" & [Record ID#]),

"javascript:alert('This has already logged in.')")


And here is the error message:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<qdbapi> <action>API_EditRecord</action> <errcode>24</errcode> <errtext>Invalid Application Token</errtext> <errdetail>An Application Token must be supplied.</errdetail> </qdbapi>
Photo of Amanda

Amanda

  • 10 Points

Posted 4 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,310 Points 50k badge 2x thumb
You can either go to the Advanced Properties for the app and turn off he requirement for Application Tokens or else have the app create one for you and supply it in your formula such as



URLRoot() & "db/" & Dbid() & 

"?a=API_EditRecord&rid="& [Record ID#]

& "&apptoken=abcdefghi123456"


& "&_fid_16=" & 

URLEncode (Now())

Photo of Amanda

Amanda

  • 10 Points
I created an app token and added it right where you said and it worked perfectly. Thank you!