# \[Pro 2023\] Accessing the WebAPI of my App

**URL:** <https://community.homey.app/t/pro-2023-accessing-the-webapi-of-my-app/83241>\
**Category:** Developers\
**Tags:** app, homey-pro\
**Created:** [June 26, 2023, 12:52pm UTC](https://community.homey.app/t/pro-2023-accessing-the-webapi-of-my-app/83241 "2023-06-26T12:52:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_Pijl](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tom_pijl/32/58111_2.png) [@Tom\_Pijl](https://community.homey.app/u/Tom_Pijl)\
**Post date:** [June 26, 2023, 12:52pm UTC](https://community.homey.app/t/pro-2023-accessing-the-webapi-of-my-app/83241/1 "2023-06-26T12:52:25Z")

</div>

I have created a REST API according to the instrucions for a [Web API](https://apps.developer.homey.app/advanced/web-api).  
Now I would like to use Postman to access this REST API using the URL:  
`http://<IP address of my Homey>/api/app/nl.das.pidevice/metric?name=Metric1`  
Without using authentication I get the error:

```auto
{
    "error": "Missing Session",
    "error_description": "Missing Session",
    "stack": "Error: Missing Session\n at file:///app/lib/ManagerApi.mjs:81:25\n at processTicksAndRejections (node:internal/process/task_queues:95:5)",
    "statusCode": 401,
    "statusName": "HomeyErrorUnauthorized"
}

```

So I suppose I need to use some kind of authentication. I tried Basic with my email and password, but that didn’t work.  
If I need OAuth2 using the developer ClientID and ClientSecret then I need to have the Auth URL, Access Token URL and Refresh Token URL of the OAuth2 provider. But these are not published by Athom as far as I can google…

Anyone any suggestions how to continue?

---

<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:** [June 26, 2023, 12:59pm UTC](https://community.homey.app/t/pro-2023-accessing-the-webapi-of-my-app/83241/2 "2023-06-26T12:59:57Z")

</div>

> [@Tom\_Pijl](#):
>
> So I suppose I need to use some kind of authentication

> **[Getting started with API Keys](https://support.homey.app/hc/en-us/articles/8178797067292-Getting-started-with-API-Keys)**
>
> Homey Pro (Early 2023) offers a feature called API Keys, that's intended for hobbyists and developers to create integrations with their Homey Pro.
> 1. Creating the API Key
> To create an API Key, navi...

---

<div class="post-metadata">

**Author:** ![Tom\_Pijl](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tom_pijl/32/58111_2.png) [@Tom\_Pijl](https://community.homey.app/u/Tom_Pijl)\
**Post date:** [June 26, 2023, 3:30pm UTC](https://community.homey.app/t/pro-2023-accessing-the-webapi-of-my-app/83241/3 "2023-06-26T15:30:11Z")

</div>

Thanks, Robert, it works like a charm if you use the “Bearer Token” authorization and not the “API token” authorization in Postman 👍

By the way: Why is this page not incorporated in the WebAPI documentation?

---

<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:** [June 26, 2023, 5:04pm UTC](https://community.homey.app/t/pro-2023-accessing-the-webapi-of-my-app/83241/4 "2023-06-26T17:04:41Z")

</div>

> [@Tom\_Pijl](#):
>
> By the way: Why is this page not incorporated in the WebAPI documentation?

Updating the documentation doesn’t have a huge priority for Athom.
