Forum Discussion

GBab's avatar
GBab
Qrew Member
4 years ago

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&_fn...
  • NathanHawe's avatar
    NathanHawe
    4 years ago
    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
    ------------------------------