Forum Discussion

EdwardHefter's avatar
EdwardHefter
Qrew Cadet
3 years ago

Need help with TinyURL API via JSON

I am relatively new to using JSON APIs in Pipelines and am having problems getting a TinyURL for a really big URL from Quickbase (I plan to use it as a QR code, so smaller is better!).

This is the Fetch JSON step I am using:

This is the response I get back:
The error message from the API looks like it is not finding the URL, but when I use the Dev page at https://tinyurl.com/app/dev and put in this as the body, I get the response I expect and a TinyURL that works:
{ "url": "https://sutubra.quickbase.com/db/brw4aa7v5/(_DBID_TEMP_TABLE_FOR_CLOCKING_IN_AND_OUT)?a=API_AddRecord&_fid_7=504&_fid_8=Now&apptoken=XXXXXXXXXXX&rdr=https%3A%2F%2Fsutubra.quickbase.com%2Fdb%2Fbrw4aa7v5%2F(_DBID_TIMECARDS)%3Fa%3Dq%26qid%3D8" , "domain": "tinyurl.com", "alias": "", "tags": ""}

Any suggestions on what I am doing wrong?

------------------------------
Edward Hefter
www.Sutubra.com
------------------------------
  • Maybe pipelines isn't passing that URL field across as a proper JSON object.  

    Try writing the field in pipelines like this:

    {{a.url_for_temp_tablescan|tojson}}      and see if that fixes it.


    ------------------------------
    Jeff Peterson
    ------------------------------
    • EdwardHefter's avatar
      EdwardHefter
      Qrew Cadet
      Nope, that didn't work either. It's frustrating because I can see it passing a URL, but TinyURL's API is saying it isn't getting one....

      ------------------------------
      Edward Hefter
      www.Sutubra.com
      ------------------------------
      • JeffPeterson1's avatar
        JeffPeterson1
        Qrew Captain
        Try pointing your pipeline to a requestbin (https://requestbin.com/) or some similar service and trigger it so you can see exactly what pipelines is sending.

        ------------------------------
        Jeff Peterson
        ------------------------------