# Help for web\_api

**URL:** <https://community.thunkable.com/t/help-for-web-api/1369985>\
**Category:** Questions about Thunkable X\
**Created:** [June 29, 2021, 1:04pm UTC](https://community.thunkable.com/t/help-for-web-api/1369985 "2021-06-29T13:04:04Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Balanced\_Kitchen](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Balanced\_Kitchen](https://community.thunkable.com/u/Balanced_Kitchen)\
**Post date:** [June 29, 2021, 1:04pm UTC](https://community.thunkable.com/t/help-for-web-api/1369985/1 "2021-06-29T13:04:05Z")

</div>

I don’t know how to use a POST in Web\_API. As far as I understand it is necessary to create a JSON file and send it through a POST. Please someone give me a visual example of how to do it.  
This is the API documentation:  
[Customers (ecwid.com)](https://api-docs.ecwid.com/reference/customers#create-customer)  
Thanks!

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [June 29, 2021, 2:16pm UTC](https://community.thunkable.com/t/help-for-web-api/1369985/2 "2021-06-29T14:16:26Z")

</div>

Here are a couple places to start:

> [@Help with WEB API POST Request](https://community.thunkable.com/t/help-with-web-api-post-request/624457):
>
> I have a problem, i want to make a POST, but i dont know how. Its for create a PDF document from html code, the Web Api is pdfcrowd. This his how i can make the request, but i cannot called correctly. I want to know if someone can do it. Thanks, sorry but english is not my first language.

> [@Web API Post function for Twilio](https://community.thunkable.com/t/web-api-post-function-for-twilio/1040399):
>
> I’ve been using the Web API component for a while now, I’ve been successfully sending post request to Twilio rest API with CURL. Yesterday the same blocks in Thunkable but getting the CURL error 400, according to the Web API status output I’m missing a parameter in the post body but I haven’t change anything. Could it be the Web API component? Is anyone else having problem with the Web API component?

---

<div class="post-metadata">

**Author:** ![alex\_ezacae](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@alex\_ezacae](https://community.thunkable.com/u/alex_ezacae)\
**Post date:** [June 29, 2021, 2:55pm UTC](https://community.thunkable.com/t/help-for-web-api/1369985/3 "2021-06-29T14:55:14Z")

</div>

hello,

you want to do the post customer request ?

---

<div class="post-metadata">

**Author:** ![emma0122](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/emma0122/32/108510_2.png) [@emma0122](https://community.thunkable.com/u/emma0122)\
**Post date:** [June 29, 2021, 3:27pm UTC](https://community.thunkable.com/t/help-for-web-api/1369985/4 "2021-06-29T15:27:58Z")

</div>

I thought the same but it doesn’t seem to be like that.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [June 29, 2021, 4:09pm UTC](https://community.thunkable.com/t/help-for-web-api/1369985/5 "2021-06-29T16:09:59Z")

</div>

The major part of your API is the `access token` which you need to get it from the system to be able to add/update the data stored.

Are you successful in getting that?

If yes then the rest is just parsing the URL string.

---

<div class="post-metadata">

**Author:** ![Balanced\_Kitchen](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Balanced\_Kitchen](https://community.thunkable.com/u/Balanced_Kitchen)\
**Post date:** [June 30, 2021, 5:24am UTC](https://community.thunkable.com/t/help-for-web-api/1369985/6 "2021-06-30T05:24:08Z")

</div>

> [@muneer](#):
>
> parsing the URL string.

Yes I have an access token, but I don’t know how to use the blocks. I tried all the available examples in the community but none of them worked for me. What do you mean in “parsing the URL string.”  
These are my blocks. Where am I wrong?

 ![wep_api](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/e/ee177adf0392cf0de69a3578cf7c821dd43e0315.png)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [June 30, 2021, 8:41am UTC](https://community.thunkable.com/t/help-for-web-api/1369985/7 "2021-06-30T08:41:39Z")

</div>

What is the `response` you are receiving from the POST call?

For testing sake, show the response first before checking for error or status.

---

<div class="post-metadata">

**Author:** ![Balanced\_Kitchen](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Balanced\_Kitchen](https://community.thunkable.com/u/Balanced_Kitchen)\
**Post date:** [June 30, 2021, 9:04am UTC](https://community.thunkable.com/t/help-for-web-api/1369985/8 "2021-06-30T09:04:25Z")

</div>

response - empty  
status - 403  
error - unknown

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [June 30, 2021, 9:16am UTC](https://community.thunkable.com/t/help-for-web-api/1369985/9 "2021-06-30T09:16:06Z")

</div>

403 means you do not have access to the data.

---

<div class="post-metadata">

**Author:** ![Balanced\_Kitchen](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Balanced\_Kitchen](https://community.thunkable.com/u/Balanced_Kitchen)\
**Post date:** [June 30, 2021, 10:51am UTC](https://community.thunkable.com/t/help-for-web-api/1369985/10 "2021-06-30T10:51:19Z")

</div>

I understand! I use the blocks correctly, but the access token I have does not give me access to this data and this is actually my problem.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [June 30, 2021, 11:18am UTC](https://community.thunkable.com/t/help-for-web-api/1369985/11 "2021-06-30T11:18:49Z")

</div>

The documentation shows 2 methods to obtain the access token

- redirect (callback) URL which is the easiest but require that you catch the redirected token from the called back URL.

- API get call that you should do before the post call.

---

<div class="post-metadata">

**Author:** ![Balanced\_Kitchen](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Balanced\_Kitchen](https://community.thunkable.com/u/Balanced_Kitchen)\
**Post date:** [June 30, 2021, 11:29am UTC](https://community.thunkable.com/t/help-for-web-api/1369985/12 "2021-06-30T11:29:23Z")

</div>

I do not understand. I have this in the control panel

 ![token](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/3/83da15e16df32b28e1f9b92ae86bf29fda717e41.png)  
I use these аccess tokens for authorization.  
I think that’s right. Or maybe I’m wrong?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [June 30, 2021, 12:22pm UTC](https://community.thunkable.com/t/help-for-web-api/1369985/13 "2021-06-30T12:22:17Z")

</div>

Something I don’t understand in the documentation of this service.

The example written is different than the sample code

[https://app.ecwid.com/api/v3/14430165/profile?token=123456789abcd](https://app.ecwid.com/api/v3/14430165/profile?token=123456789abcd)

This is the example. The documentation does not mention “ **profile** ”.

---

<div class="post-metadata">

**Author:** ![Balanced\_Kitchen](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Balanced\_Kitchen](https://community.thunkable.com/u/Balanced_Kitchen)\
**Post date:** [June 30, 2021, 12:31pm UTC](https://community.thunkable.com/t/help-for-web-api/1369985/14 "2021-06-30T12:31:06Z")

</div>

this is a string that determines what information will be searched  
profile - basic store information  
orders - order data  
customers - customer data  
etc.  
at least that’s how I understand it.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [June 30, 2021, 12:39pm UTC](https://community.thunkable.com/t/help-for-web-api/1369985/15 "2021-06-30T12:39:51Z")

</div>

Sorry,  
There seems to be a problem in the docs. Every time I try to use the “copy button” in the website to copy the text for creating the customer, I got the last copied text.

Anyway, I tried doing the same with `postman` and I get the same error code. Of course in my situation I know the token is not correct.

If you can use postman to verify that the issue is actually an authorization issue and not Thunkable.

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

---

<div class="post-metadata">

**Author:** ![Balanced\_Kitchen](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Balanced\_Kitchen](https://community.thunkable.com/u/Balanced_Kitchen)\
**Post date:** [June 30, 2021, 12:49pm UTC](https://community.thunkable.com/t/help-for-web-api/1369985/16 "2021-06-30T12:49:26Z")

</div>

> [@muneer](#):
>
> postman

will you give me a link to postman

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [June 30, 2021, 12:50pm UTC](https://community.thunkable.com/t/help-for-web-api/1369985/17 "2021-06-30T12:50:53Z")

</div>

> **[Download Postman | Try Postman for Free](https://www.postman.com/downloads/)**
>
> Try Postman for free! Join 13 million developers who rely on Postman, the collaboration platform for API development. Create better APIs—faster.

---

<div class="post-metadata">

**Author:** ![Balanced\_Kitchen](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Balanced\_Kitchen](https://community.thunkable.com/u/Balanced_Kitchen)\
**Post date:** [June 30, 2021, 12:51pm UTC](https://community.thunkable.com/t/help-for-web-api/1369985/18 "2021-06-30T12:51:38Z")

</div>

> [@muneer](#):
>
> `postman`

Thanks

---

<div class="post-metadata">

**Author:** ![Balanced\_Kitchen](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Balanced\_Kitchen](https://community.thunkable.com/u/Balanced_Kitchen)\
**Post date:** [June 30, 2021, 1:04pm UTC](https://community.thunkable.com/t/help-for-web-api/1369985/19 "2021-06-30T13:04:32Z")

</div>

403 Token has no required permission CREATE\_CUSTOMERS 🙂  
Thank you very much @muneer . I will write to Ecwid support for a correct token

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [June 30, 2021, 2:20pm UTC](https://community.thunkable.com/t/help-for-web-api/1369985/20 "2021-06-30T14:20:10Z")

</div>

Just to mention although I know you know it.

The docs mention that POST calls require **secret token** and will not work with **public token**.

So if the token used in the call is the public one it would fail.

[Next page](https://community.thunkable.com/t/help-for-web-api/1369985.md?page=2)
