# Help with Glide Call API and Apify (400 error)

**URL:** <https://community.glideapps.com/t/help-with-glide-call-api-and-apify-400-error/78567>\
**Category:** Ask for Help\
**Created:** [December 13, 2024, 2:41am UTC](https://community.glideapps.com/t/help-with-glide-call-api-and-apify-400-error/78567 "2024-12-13T02:41:32Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)\
**Post date:** [December 13, 2024, 2:41am UTC](https://community.glideapps.com/t/help-with-glide-call-api-and-apify-400-error/78567/1 "2024-12-13T02:41:32Z")

</div>

I am using this [Apify actor](https://console.apify.com/actors/aYG0l9s7dbB7j3gbS/input).

I can test an api all successfully in postman.  
I pasted the endpoint and body from Glide into postman.

 ![Screenshot 2024-12-13 at 13.39.10](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/1/216fcac27d9acf9e4a1ca2be5a35a05ade915f53.png)

 ![Screenshot 2024-12-13 at 13.40.50](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/b/db237492ab7ac647f3efd1e2f1c8dc9d049f7bc7.png)

Desperate to solve ☹  
Trying to figure out why I get a 400 error from Glide but exact same data works via postman.

---

<div class="post-metadata">

**Author:** ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)\
**Post date:** [December 13, 2024, 2:49am UTC](https://community.glideapps.com/t/help-with-glide-call-api-and-apify-400-error/78567/2 "2024-12-13T02:49:11Z")

</div>

Update: If I paste the endpoint and body into the Call API configure action form, then it works! but using the same values from a table column doesn’t work.

Ahhhhh!

I need the body to be dynamic.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [December 13, 2024, 3:01am UTC](https://community.glideapps.com/t/help-with-glide-call-api-and-apify-400-error/78567/3 "2024-12-13T03:01:03Z")

</div>

My guess would be that your dynamic JSON may not be valid. You can check this by copy/pasting the generated JSON into an online validator such as [https://jsonlint.com/](https://jsonlint.com/)

It looks like you are using a Template column to generate the JSON. Best practise is to use the JSON Object and/or JSON Template columns to generate it. This ensures you will always get valid JSON.

---

<div class="post-metadata">

**Author:** ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)\
**Post date:** [December 13, 2024, 3:06am UTC](https://community.glideapps.com/t/help-with-glide-call-api-and-apify-400-error/78567/4 "2024-12-13T03:06:01Z")

</div>

wow, amazing, will try now. this is hurting me 🙃

---

<div class="post-metadata">

**Author:** ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)\
**Post date:** [December 13, 2024, 3:08am UTC](https://community.glideapps.com/t/help-with-glide-call-api-and-apify-400-error/78567/5 "2024-12-13T03:08:37Z")

</div>

how do I create this where the url is dynamic using json object?  
{ “startUrls”:[{“url”:“[https://www.juremont.com.au/](https://www.juremont.com.au/)”}], “maxCrawlingDepth”:5 }

or do I need a template?

---

<div class="post-metadata">

**Author:** ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)\
**Post date:** [December 13, 2024, 3:20am UTC](https://community.glideapps.com/t/help-with-glide-call-api-and-apify-400-error/78567/6 "2024-12-13T03:20:08Z")

</div>

looks like I need a template, however I can’t get the substitute values working now. Help?

 ![Screenshot 2024-12-13 at 14.20.02](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/c/7cb066c5c067f9a10215302ca9d126a83e9c657d.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [December 13, 2024, 3:26am UTC](https://community.glideapps.com/t/help-with-glide-call-api-and-apify-400-error/78567/7 "2024-12-13T03:26:17Z")

</div>

Bare strings should be quoted when using as replacements. eg. `"https://example.com"`  
But should you be using a column value there?

---

<div class="post-metadata">

**Author:** ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)\
**Post date:** [December 13, 2024, 3:29am UTC](https://community.glideapps.com/t/help-with-glide-call-api-and-apify-400-error/78567/8 "2024-12-13T03:29:24Z")

</div>

I tried both.

So what do change?  
“$link”

won’t that turn into “whatever link I enter or a column value that is also a link”?

Oh! I removed the “” in my value and it worked so “url”: $link.  
Amazing!!!

---

<div class="post-metadata">

**Author:** ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)\
**Post date:** [December 13, 2024, 3:31am UTC](https://community.glideapps.com/t/help-with-glide-call-api-and-apify-400-error/78567/9 "2024-12-13T03:31:31Z")

</div>

and it still fails with a 400 error. sigh

---

<div class="post-metadata">

**Author:** ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)\
**Post date:** [December 13, 2024, 3:38am UTC](https://community.glideapps.com/t/help-with-glide-call-api-and-apify-400-error/78567/10 "2024-12-13T03:38:41Z")

</div>

For context, this works:

 ![Screenshot 2024-12-13 at 14.35.00](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/0/d0c45c7b06f81c064835fa114313e3e8c9878b65.png)

This fails (using this column value as the json)

 ![Screenshot 2024-12-13 at 14.35.21](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/e/1ee6a943ccf0722a747a9712705d35b6240fb844.png)

this is the output I see in Glide (assuming this is exactly what is substituted into the call using a column value:

 ![Screenshot 2024-12-13 at 14.37.00](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/d/7dbc58c88974373a6b7de8c11b9c0803b1093a0b.png)

However, copying from the data editor and pasting into the jsonlint tool gives me:  
 ![Screenshot 2024-12-13 at 14.38.09](https://us1.discourse-cdn.com/flex002/uploads/glideapps/optimized/3X/f/8/f8244d177bd2e3283bf797bcbba2117bbe972797_2_690x76.png)

Where are the “” coming from?? Is Glide adding “” for no reason when coming from a column value and this is the problem?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [December 13, 2024, 3:49am UTC](https://community.glideapps.com/t/help-with-glide-call-api-and-apify-400-error/78567/11 "2024-12-13T03:49:11Z")

</div>

> [@blairrorani](#):
>
> Where are the “” coming from?? Is Glide adding “” for no reason when coming from a column value and this is the problem?

That sometimes happens when you copy/paste. I think it’s a Glide bug. Try it 2 or 3 times until the extra quotes disappear. Note that it won’t impact what is actually generated.

Could it be the trailing forward slash on the URL that is causing the problem?

---

<div class="post-metadata">

**Author:** ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)\
**Post date:** [December 13, 2024, 3:52am UTC](https://community.glideapps.com/t/help-with-glide-call-api-and-apify-400-error/78567/12 "2024-12-13T03:52:53Z")

</div>

k sounds like no big deal then, phew.

It doesn’t work with or without it, oh man.

Wait no! I removed it and it worked. Oh my goodness, thanks so much @Darren_Murphy I have tried so many permutations that I hadn’t tried everything else plus no trailing /.

Legend

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [December 20, 2024, 4:05am UTC](https://community.glideapps.com/t/help-with-glide-call-api-and-apify-400-error/78567/14 "2024-12-20T04:05:17Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
