# Help with WEB API POST Request

**URL:** <https://community.thunkable.com/t/help-with-web-api-post-request/624457>\
**Category:** Questions about Thunkable X\
**Tags:** beginner\
**Created:** [June 19, 2020, 8:41am UTC](https://community.thunkable.com/t/help-with-web-api-post-request/624457 "2020-06-19T08:41:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mercadovirreyes05](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@mercadovirreyes05](https://community.thunkable.com/u/mercadovirreyes05)\
**Post date:** [June 19, 2020, 8:41am UTC](https://community.thunkable.com/t/help-with-web-api-post-request/624457/1 "2020-06-19T08:41:53Z")

</div>

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.

 ![15925559344142431125676498426646](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/7/072b89e5cba5c823672258f2c3cd2a3a323c2f19.jpeg) 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.

---

<div class="post-metadata">

**Author:** ![tchind](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@tchind](https://community.thunkable.com/u/tchind)\
**Post date:** [June 19, 2020, 10:00am UTC](https://community.thunkable.com/t/help-with-web-api-post-request/624457/2 "2020-06-19T10:00:53Z")

</div>

oh…I am also a beginner. Which platform is this?Not thunkable

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [June 19, 2020, 11:15am UTC](https://community.thunkable.com/t/help-with-web-api-post-request/624457/3 "2020-06-19T11:15:16Z")

</div>

Hi @mercadovirreyes05

We have a series on Youtube about using the Web API component:

[![](https://img.youtube.com/vi/rUnWhwHHmO4/maxresdefault.jpg "Thunkable Web API Component [Snap to Place]") ](https://www.youtube.com/watch?v=rUnWhwHHmO4)

There are also a few examples of POST requests here in the community.

* * *

> [@mercadovirreyes05](#):
>
> but i cannot called correctly.

Can you tell us what error message or response code you’re seeing?

---

<div class="post-metadata">

**Author:** ![mercadovirreyes05](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@mercadovirreyes05](https://community.thunkable.com/u/mercadovirreyes05)\
**Post date:** [June 19, 2020, 10:12pm UTC](https://community.thunkable.com/t/help-with-web-api-post-request/624457/4 "2020-06-19T22:12:31Z")

</div>

Thanks for your time and support.

I tried to use the curl parameter in the web api headers and then in the parameters, and I don’t have any response, authorization error or just a “null”. I am really just experimenting because I don’t know even if the curl can be called in the that I tried to do it.

Please any suggestions means a lot to me.

My intention is generate a pdf file from a html code or html text.

In advance, thank you, for your time.

---

<div class="post-metadata">

**Author:** ![hdawc](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hdawc/32/119068_2.png) [@hdawc](https://community.thunkable.com/u/hdawc)\
**Post date:** [June 19, 2020, 10:16pm UTC](https://community.thunkable.com/t/help-with-web-api-post-request/624457/5 "2020-06-19T22:16:44Z")

</div>

You will probably want to create the PDF using the HTTP API?

[https://pdfcrowd.com/doc/api/html-to-pdf/http/](https://pdfcrowd.com/doc/api/html-to-pdf/http/)

I imagine here is where you might start (though I could be mistaken!)

![post-PDF-conversion-start](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/2/d2fc8acee3a25065f2c3751d5aef48206049cb6f.png)

If you use `create object` it can create the json headers you need for the API to create the PDF. That link has most of what you need to complete it.

_(ignore the button click component that’s just for the example)_

---

<div class="post-metadata">

**Author:** ![mercadovirreyes05](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@mercadovirreyes05](https://community.thunkable.com/u/mercadovirreyes05)\
**Post date:** [June 19, 2020, 10:26pm UTC](https://community.thunkable.com/t/help-with-web-api-post-request/624457/6 "2020-06-19T22:26:29Z")

</div>

Hi Eric, it make sense. I tried a different method by making a list. I am going to tried in the way that you suggest. And post here if it is the correct way.

Thank you.

---

<div class="post-metadata">

**Author:** ![mercadovirreyes05](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@mercadovirreyes05](https://community.thunkable.com/u/mercadovirreyes05)\
**Post date:** [June 20, 2020, 3:23am UTC](https://community.thunkable.com/t/help-with-web-api-post-request/624457/7 "2020-06-20T03:23:46Z")

</div>

Authorization failed- Provide a valid username and API key.

Is the error code that i get.

But i dont have idea if what i am doing is remotely correct.

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

---

<div class="post-metadata">

**Author:** ![hdawc](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hdawc/32/119068_2.png) [@hdawc](https://community.thunkable.com/u/hdawc)\
**Post date:** [August 4, 2020, 3:36am UTC](https://community.thunkable.com/t/help-with-web-api-post-request/624457/8 "2020-08-04T03:36:21Z")

</div>

@mercadovirreyes05

The body shouldn’t be curl.

You need to start with this:

 ![web-api-example](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/a/aa0910dbf7125aed30f3a2ac37bbaaaea10654a2.png)

Put your correct API key in there and don’t add the colon ‘ **:** ’ after Authorization, it will do that for you when you click the **Add** button

Then you can use these options in the create object component [https://pdfcrowd.com/doc/api/html-to-pdf/http/#reference](https://pdfcrowd.com/doc/api/html-to-pdf/http/#reference)  
like this:

 ![thunk-pdfcrowd-2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/e/7ea513b04273c30d12d98c674011c9ffab6b1aaa.png)

I don’t have a valid API key but that should return a URL which you can put in an “Open Link” Control Component 😊👍

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:25am UTC](https://community.thunkable.com/t/help-with-web-api-post-request/624457/9 "2024-11-08T11:25:37Z")

</div>


