Forum Discussion

AndrewFry's avatar
AndrewFry
Qrew Assistant Captain
4 years ago

Application Token

I have a button that allows me to input the date and username of the person using the button.
In previous versions of the app, the "Require Application Tokens" was unchecked, however, for the added security that it provides, we are going to start using it.

The issue I am having is that now when the button is clicked, it gives an API_Edit_Record error due to no associated app token.
I have gone into the App Properties, Manage Application Token, and Created a New Application Token.

Afterward, I edited the button's code and added the following to the end: & "apptoken=xxxxxxxxxxxx", with xxxxxxxxxx being the actual token id. But I still get the same error.

I have a few other buttons I need to do this to, so I would like to get it correct.

The full button code is:

URLRoot() & "db/" & Dbid()
& "?act=API_EDITRecord&rid=" & [Assignment_ID_#]
& "&_fid_23=" & Now()
& "&_fid_24=" & UserToName(User(), "FF")
& "&_fid_34=" & "1"
& "apptoken=TokenCodeHere"
& "&disprec=1"

What am I missing? Do I perhaps have the apptoken line in an incorrect sequence? Should it be directly after the 2nd line?

Any thoughts/input is appreciated. Thank you!!

------------------------------
Andrew
------------------------------

2 Replies

  • np,

    There are two kinds of uses for the & character.   One use is for concatenation like in excel.
    But inside the quotes they mean "Heads up Quickbase, a parameter is comin' at ya."

    This line needs to have the second kind

    & "&apptoken=TokenCodeHere"

    '

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • AndrewFry's avatar
      AndrewFry
      Qrew Assistant Captain
      Thanks Mark!! Just a simple character missing makes all the difference!! I appreciate your quick response.

      ------------------------------
      Andrew
      ------------------------------