# API Endpoint Presence didn´t work

**URL:** <https://community.homey.app/t/api-endpoint-presence-didn-t-work/142013>\
**Category:** Developers\
**Created:** [August 21, 2025, 4:42am UTC](https://community.homey.app/t/api-endpoint-presence-didn-t-work/142013 "2025-08-21T04:42:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cj82rnk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cj82rnk/32/79242_2.png) [@cj82rnk](https://community.homey.app/u/cj82rnk)\
**Post date:** [August 21, 2025, 4:42am UTC](https://community.homey.app/t/api-endpoint-presence-didn-t-work/142013/1 "2025-08-21T04:42:55Z")

</div>

Hey,

Why can’t I retrieve any data at the Presence endpoint (→ [ManagerPresence - Homey Web API](https://athombv.github.io/node-homey-api/HomeyAPIV3Local.ManagerPresence.html#getState))? Everything else works fine.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [August 21, 2025, 11:17am UTC](https://community.homey.app/t/api-endpoint-presence-didn-t-work/142013/2 "2025-08-21T11:17:10Z")

</div>

Maybe you should share or point to the code you use for it?  
Otherwise I’m afraid you won’t get any sensible reply 😉

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [August 21, 2025, 11:24am UTC](https://community.homey.app/t/api-endpoint-presence-didn-t-work/142013/3 "2025-08-21T11:24:06Z")

</div>

“Code or it didn’t happen”

---

<div class="post-metadata">

**Author:** ![cj82rnk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cj82rnk/32/79242_2.png) [@cj82rnk](https://community.homey.app/u/cj82rnk)\
**Post date:** [August 21, 2025, 11:25am UTC](https://community.homey.app/t/api-endpoint-presence-didn-t-work/142013/4 "2025-08-21T11:25:55Z")

</div>

this work:

```auto
	$curl = curl_init();

	curl_setopt_array($curl, array(
	  CURLOPT_URL => $remote_url . '/api/manager/devices/device',
	  CURLOPT_RETURNTRANSFER => true,
	  CURLOPT_ENCODING => '',
	  CURLOPT_MAXREDIRS => 10,
	  CURLOPT_TIMEOUT => 0,
	  CURLOPT_FOLLOWLOCATION => true,
	  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
	  CURLOPT_CUSTOMREQUEST => 'GET',
	  CURLOPT_HTTPHEADER => array('Authorization: Bearer ' . $homey_api_data['api_key'], 'accept: application/json'),
	));

	$response = curl_exec($curl);

	curl_close($curl);

	print_r(json_decode($response, true));

```

and this, for presence not:

```auto
	$curl = curl_init();

	curl_setopt_array($curl, array(
	  CURLOPT_URL => $remote_url . '/api/manager/presence/state',
	  CURLOPT_RETURNTRANSFER => true,
	  CURLOPT_ENCODING => '',
	  CURLOPT_MAXREDIRS => 10,
	  CURLOPT_TIMEOUT => 0,
	  CURLOPT_FOLLOWLOCATION => true,
	  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
	  CURLOPT_CUSTOMREQUEST => 'GET',
	  CURLOPT_HTTPHEADER => array('Authorization: Bearer ' . $homey_api_data['api_key'], 'accept: application/json'),
	));

	$response = curl_exec($curl);

	curl_close($curl);

	print_r(json_decode($response, true));

```

only the URL is an other one

---

<div class="post-metadata">

**Author:** ![cj82rnk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cj82rnk/32/79242_2.png) [@cj82rnk](https://community.homey.app/u/cj82rnk)\
**Post date:** [August 21, 2025, 11:26am UTC](https://community.homey.app/t/api-endpoint-presence-didn-t-work/142013/5 "2025-08-21T11:26:31Z")

</div>

> [@cj82rnk](#):
>
> `/api/manager/presence/state`

the output of this request is empty

---

<div class="post-metadata">

**Author:** ![cj82rnk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cj82rnk/32/79242_2.png) [@cj82rnk](https://community.homey.app/u/cj82rnk)\
**Post date:** [August 25, 2025, 6:01pm UTC](https://community.homey.app/t/api-endpoint-presence-didn-t-work/142013/6 "2025-08-25T18:01:33Z")

</div>

And now?
