Forum Discussion

BenjaminBrooks's avatar
BenjaminBrooks
Qrew Trainee
6 years ago

API Issue

Hello All,

I am having trouble creating a new lead which is coming from my phone system and pushing to QB. This is what i am using but i feel like my auth is wrong I took out my usertoken on purpose but what am i missing?

https://seniorchoiceplans.quickbase.com/db/bqfx8k92p?a=API_AddRecord&_fid_7=[[phone_number]]&_fid_83=[[custom1]]&usertoken=


------------------------------
Benjamin Brooks
------------------------------

13 Replies

  • It wants an Application Token.  In the Advanced settings for the app, you will either need to disable the need for an application token or else generate one and provide it.

    ....&apptoken=hgsadhjdsajdsakjdasadsjkh"

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • BenjaminBrooks's avatar
      BenjaminBrooks
      Qrew Trainee
      So use both the user token and app token?

      ------------------------------
      Benjamin Brooks
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        I think that if you have the need for an application token enabled then you have to provide an application token. So yes both an application token and a user token.

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------
  • AustinK's avatar
    AustinK
    Qrew Commander
    https://help.quickbase.com/api-guide/add_record.html

    That should be helpful. They have a part at the bottom showing how to use it in a URL.

    Are your fields named "[[phone number]]" and "[[cutsom1]]", with the extra bracket? 

    You will need to URLEncode the fields you are trying to use in this URL.

    If you look at one of the "Add" buttons that is created in a relationship it can help guide you in the right direction. Here is one cleaned up with the AddRecord function. If you are adding a record to a child table or related table then don't forget to bring along the record id for the "Related X" field on the child table so it knows what record it is related to in the parent. You may or may not need this.

    URLRoot() & "db/" & [_DBID_MY_DBID] & "?a=API_AddRecord&_fid_1782=" & URLEncode ([Record ID#]) & "&_fid_7=" & URLEncode ([Phone Number]) & "&_fid_83=" & URLEncode ([custom1])-
    I see you got it working though so nevermind, but URL encoding is important. You should do it or you may find yourself with some bad data or another failure depending what is contained in there.
    • BenjaminBrooks's avatar
      BenjaminBrooks
      Qrew Trainee
      Austin,

      Thank you for that! The double brackets are fields from my phone system that is how they are formatted for variable information!

      ------------------------------
      Benjamin Brooks
      ------------------------------