# WEB API network request failed

**URL:** <https://community.thunkable.com/t/web-api-network-request-failed/1978117>\
**Category:** Web API's\
**Tags:** webapi\
**Created:** [July 27, 2022, 3:49pm UTC](https://community.thunkable.com/t/web-api-network-request-failed/1978117 "2022-07-27T15:49:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Application](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@Application](https://community.thunkable.com/u/Application)\
**Post date:** [July 27, 2022, 3:49pm UTC](https://community.thunkable.com/t/web-api-network-request-failed/1978117/1 "2022-07-27T15:49:32Z")

</div>

I have create a web api.  
The GET method works fine but I take error in the POST method .

**My GET block is the following:**

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/a/2a9acd92b7376c4f3dc722365e7f1e8967a706de.png)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/5/f5b8a46f0f6c6537be751ed8a04f0345233329ff.png)

**My POST block is the following:**

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/d/cd7d832848d0affffea07cf1cba5e223b78981f5.png)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/1/a16462d9063f4d083e977ce9b023b6f465fe262f.png)

I believe is something with the Token but I don’t know to solve it.

---

<div class="post-metadata">

**Author:** ![zander](https://avatars.discourse-cdn.com/v4/letter/z/ecb155/32.png) [@zander](https://community.thunkable.com/u/zander)\
**Post date:** [July 27, 2022, 3:53pm UTC](https://community.thunkable.com/t/web-api-network-request-failed/1978117/2 "2022-07-27T15:53:43Z")

</div>

What’s the error?

---

<div class="post-metadata">

**Author:** ![Application](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@Application](https://community.thunkable.com/u/Application)\
**Post date:** [July 27, 2022, 3:55pm UTC](https://community.thunkable.com/t/web-api-network-request-failed/1978117/3 "2022-07-27T15:55:16Z")

</div>

Network request failed

---

<div class="post-metadata">

**Author:** ![zander](https://avatars.discourse-cdn.com/v4/letter/z/ecb155/32.png) [@zander](https://community.thunkable.com/u/zander)\
**Post date:** [July 27, 2022, 3:57pm UTC](https://community.thunkable.com/t/web-api-network-request-failed/1978117/4 "2022-07-27T15:57:07Z")

</div>

Did you try on the companion app or in the web viewer?

---

<div class="post-metadata">

**Author:** ![Application](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@Application](https://community.thunkable.com/u/Application)\
**Post date:** [July 27, 2022, 4:00pm UTC](https://community.thunkable.com/t/web-api-network-request-failed/1978117/5 "2022-07-27T16:00:16Z")

</div>

I tried also by downloading the app to my mobile and also with the live test on device.  
I know that the web preview doesn’t work normally for the non https api’s.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [July 27, 2022, 4:04pm UTC](https://community.thunkable.com/t/web-api-network-request-failed/1978117/6 "2022-07-27T16:04:53Z")

</div>

You likely need to set a content-type in your header so your api knows that you late passing that data in Json format

`Content-type: application/json`

---

<div class="post-metadata">

**Author:** ![Application](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@Application](https://community.thunkable.com/u/Application)\
**Post date:** [July 27, 2022, 4:09pm UTC](https://community.thunkable.com/t/web-api-network-request-failed/1978117/7 "2022-07-27T16:09:12Z")

</div>

Just did it.  
Same error Network request failed

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/8/68953bb62c485e2fac0a586dfcdde2f90262eb65.png)

And i want to mention that with the postman works!!!

---

<div class="post-metadata">

**Author:** ![zander](https://avatars.discourse-cdn.com/v4/letter/z/ecb155/32.png) [@zander](https://community.thunkable.com/u/zander)\
**Post date:** [July 28, 2022, 4:06am UTC](https://community.thunkable.com/t/web-api-network-request-failed/1978117/10 "2022-07-28T04:06:38Z")

</div>

Instead of using the join text block. Try using create json from object and the create object blocks. Creating json using join text blocks can be tricky. The post method might be failing due to how the json is formatted when you write it with join blocks.

---

<div class="post-metadata">

**Author:** ![Application](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@Application](https://community.thunkable.com/u/Application)\
**Post date:** [July 28, 2022, 7:07am UTC](https://community.thunkable.com/t/web-api-network-request-failed/1978117/11 "2022-07-28T07:07:41Z")

</div>

I think this is not the problem because I can’t reach the SAP.  
Something with the token is, I believe. I am trying to find it but unfortunately with no luck because I am very new to thunkable.

---

<div class="post-metadata">

**Author:** ![zander](https://avatars.discourse-cdn.com/v4/letter/z/ecb155/32.png) [@zander](https://community.thunkable.com/u/zander)\
**Post date:** [July 28, 2022, 12:05pm UTC](https://community.thunkable.com/t/web-api-network-request-failed/1978117/12 "2022-07-28T12:05:51Z")

</div>

If you link your project we might be able to help you more 😀

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [October 26, 2022, 12:05pm UTC](https://community.thunkable.com/t/web-api-network-request-failed/1978117/13 "2022-10-26T12:05:59Z")

</div>

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