# PHP CURL working example needed

**URL:** <https://forum.asana.com/t/php-curl-working-example-needed/74433>\
**Category:** API & Developers\
**Created:** [14 February 2020 09:32 UTC](https://forum.asana.com/t/php-curl-working-example-needed/74433 "2020-02-14T09:32:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nishant](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/nishant/32/49627_2.png) [@Nishant](https://forum.asana.com/u/Nishant)\
**Post date:** [14 February 2020 09:32 UTC](https://forum.asana.com/t/php-curl-working-example-needed/74433/1 "2020-02-14T09:32:47Z")

</div>

Can someone please provide sample working example for task creation on ASANA which is written in PHP CURL? Thanks!

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [14 February 2020 16:17 UTC](https://forum.asana.com/t/php-curl-working-example-needed/74433/2 "2020-02-14T16:17:55Z")

</div>

Calling @Bastien_Siebman - you work in PHP, si?

---

<div class="post-metadata">

**Author:** ![Bastien\_Siebman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/bastien_siebman/32/172354_2.png) [@Bastien\_Siebman](https://forum.asana.com/u/Bastien_Siebman)\
**Post date:** [14 February 2020 16:49 UTC](https://forum.asana.com/t/php-curl-working-example-needed/74433/3 "2020-02-14T16:49:15Z")

</div>

@Nishant did you see [GitHub - Asana/php-asana: Official PHP client library for the Asana API v1](https://github.com/Asana/php-asana) ?

---

<div class="post-metadata">

**Author:** ![Nishant](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/nishant/32/49627_2.png) [@Nishant](https://forum.asana.com/u/Nishant)\
**Post date:** [17 February 2020 12:38 UTC](https://forum.asana.com/t/php-curl-working-example-needed/74433/4 "2020-02-17T12:38:45Z")

</div>

Actually Asana support sent below and asking for responding in CURL. I am using PHP code as per documentation given in API but not sure what to send them as they sent below. Am also not sure what to set as "Bearer ".

curl

-H “Authorization: Bearer XXXXXXXX” \

> 

[https://app.asana.com/api/1.0/tasks](https://app.asana.com/api/1.0/tasks)  
\

> 

–data-urlencode “assignee=XXXXXXX” \

> 

–data-urlencode “projects=XXXXXXX” \

> 

–data-urlencode “notes=Test” \

> 

–data-urlencode “name=Test via the API” \

> 

–data-urlencode “workspace=XXXXXXX” \

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 19:07 UTC](https://forum.asana.com/t/php-curl-working-example-needed/74433/5 "2025-05-30T19:07:13Z")

</div>

Closed on 30 May 2025 19:07 UTC


