# How to get uploaded image url using the Discourse API?

**URL:** <https://meta.discourse.org/t/how-to-get-uploaded-image-url-using-the-discourse-api/37800>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [January 12, 2016, 3:51am UTC](https://meta.discourse.org/t/how-to-get-uploaded-image-url-using-the-discourse-api/37800 "2016-01-12T03:51:27Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![sleep](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sleep/32/48342_2.png) [@sleep](https://meta.discourse.org/u/sleep)\
**Post date:** [January 12, 2016, 3:51am UTC](https://meta.discourse.org/t/how-to-get-uploaded-image-url-using-the-discourse-api/37800/1 "2016-01-12T03:51:27Z")

</div>

If I use this api:

```shell
curl -X POST -F username="john" -F type="image" -F file="@image.png" -F synchronous="true" "http://localhost:3000/uploads?api_key=SOMETHING&api_username=SOMEONE"

```

I just can get a response with “`{"success":"OK"}`”. But I want to get the image url .

I see the topic to solve how to get image url:

[https://meta.discourse.org/t/using-the-discourse-api-to-post-with-uploaded-files/29833/23](https://meta.discourse.org/t/using-the-discourse-api-to-post-with-uploaded-files/29833/23)

new api:

```shell
curl -X POST -F type=composer -F client_id=1234b591bb4848dd899b6e6ee0feaff9 -F 'files[]=@12HourDate.kmmacros' 'http://forum.keyboardmaestro.com/uploads.json?api_key=APIKEY&synchronous=1'

```

I can’t understand how to get the `client_id`? If I add the param “`synchronous=1`” in url. No return value!

---

_[View the full topic](https://meta.discourse.org/t/how-to-get-uploaded-image-url-using-the-discourse-api/37800)._
