Skip to main content
Solved

API_AddRecord Alternative URL Redirect

  • December 3, 2020
  • 0 replies
  • 448 views

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
------------------------------

Best answer by NathanHawe

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
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
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
------------------------------