Forum Discussion

GBab's avatar
GBab
Qrew Member
4 years ago
Solved

API_AddRecord Alternative URL Redirect

Is it possible to add a redirect to an alternative API URL? So instead of it showing the response xml page you can redirect to another URL.

https://target_domain/db/target_dbid?a=API_AddRecord&_fnm_second_year=1776&_fid_8=changed&ticket=auth_ticket&apptoken=app_token&rdr=quickbase.com


#redirect #api #api_addrecord

​​​​

------------------------------
C G
------------------------------
  • I don't recall if I've ever tested it myself, but the redirect may be as simple as adding another hidden text input to your form with name "rdr":

    <input type="text" name="rdr" value="https://quickbase.com" readonly hidden />

    A note about the usertoken in your page:  If this is a code page hosted on Quick Base, you don't necessarily need to pass the usertoken since the API will authenticate using the browser's session.  Of course, that assumes the user has sufficient access to create records in the table being posted to.  Regardless, anyone who can access that page can read that usertoken and then use it to make their own API calls against your application.  I'd be very careful about using usertokens in this manner unless absolutely necessary and you know you have rock solid access control to that page.

    ------------------------------
    Nathan Hawe
    ------------------------------

10 Replies

  • Yes, you can use this syntax. Just take as many slices of the salami off as you like
    I prefer to use formula variables for the URLs and then drop them into this syntax.

    $URLONE
    & "&rdr=" & URLEncode($URLTWO)
    & URLEncode("&rdr=" & URLEncode($URLTHREE))
    & URLEncode(URLEncode("&rdr=" & URLEncode($URLFOUR)))


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • GBab's avatar
      GBab
      Qrew Member
      @Mark Shnier (YQC)

      I want to use the alternative url so an outside application can pass the data from their form to my quickbase table with out using a pipeline.

      ------------------------------
      C G
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew Champion
        Sorry, I'm not understanding the question.  What does the initial URL look like and where do you want to redirect to?

        You can redirect with this Syntax

        initial URL here
        & "&rdr=" & URLEncode( .. the next URL here..)

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------