# Rmf web api usage (#613)

**URL:** <https://discourse.openrobotics.org/t/rmf-web-api-usage-613/44639>\
**Category:** Open-RMF General\
**Tags:** rmf-github-discuss\
**Created:** [November 19, 2024, 5:45am UTC](https://discourse.openrobotics.org/t/rmf-web-api-usage-613/44639 "2024-11-19T05:45:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Archive-o-matic](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/archive-o-matic/32/26074_2.png) [@Archive-o-matic](https://discourse.openrobotics.org/u/Archive-o-matic)\
**Post date:** [November 19, 2024, 5:45am UTC](https://discourse.openrobotics.org/t/rmf-web-api-usage-613/44639/1 "2024-11-19T05:45:13Z")

</div>

Posted by @harshp1509:

how can we use rmf web api outside of rmf-web ?

when i am trying to see the task list using api (localhost:port/tasks) than it’s giving me not authorize.

> **Chosen answer**
>
> Answer chosen by @harshp1509 at 2024-11-20T06:58:48Z.  
> Answered by @aaronchongth:
> 
> hello @harshp1509! I’m not sure how you’re currently setting up your `rmf-web` stack, if you’re using the demos that we have, take a look at [rmf-web/packages/rmf-dashboard-framework/src/services/stub-authenticator.ts at main · open-rmf/rmf-web · GitHub](https://github.com/open-rmf/rmf-web/blob/main/packages/rmf-dashboard-framework/src/services/stub-authenticator.ts) and [rmf-web/packages/api-server/api\_server/default\_config.py at main · open-rmf/rmf-web · GitHub](https://github.com/open-rmf/rmf-web/blob/main/packages/api-server/api_server/default_config.py)
> 
> For our demos we are using a hardcoded secret, which produces these hardcoded tokens, and can be used for access outside of `rmf-web`.
> 
> ```auto
> curl -H 'Accept: application/json' -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzdHViIiwicHJlZmVycmVkX3VzZXJuYW1lIjoidXNlciIsImlhdCI6MTUxNjIzOTAyMiwiYXVkIjoicm1mX2FwaV9zZXJ2ZXIiLCJpc3MiOiJzdHViIiwiZXhwIjoyMDUxMjIyNDAwfQ.vK3n4FbshCykQ9BW49w_7AfqKgbN9j2R3-Qh-rIOt_g" http://localhost:8000/tasks
> 
> ```
> 
> If you’re setting up a full deployment stack, you’ll need to use an authentication tool like `keycloak` to allow proper authentication and tokens, you can check out [GitHub - open-rmf/rmf\_deployment\_template: This repo provides a template to deploy RMF](https://github.com/open-rmf/rmf_deployment_template) for that

---

<div class="post-metadata">

**Author:** ![Archive-o-matic](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/archive-o-matic/32/26074_2.png) [@Archive-o-matic](https://discourse.openrobotics.org/u/Archive-o-matic)\
**Post date:** [November 19, 2024, 9:22am UTC](https://discourse.openrobotics.org/t/rmf-web-api-usage-613/44639/2 "2024-11-19T09:22:40Z")

</div>

Posted by @aaronchongth:

hello @harshp1509! I’m not sure how you’re currently setting up your `rmf-web` stack, if you’re using the demos that we have, take a look at [rmf-web/packages/rmf-dashboard-framework/src/services/stub-authenticator.ts at main · open-rmf/rmf-web · GitHub](https://github.com/open-rmf/rmf-web/blob/main/packages/rmf-dashboard-framework/src/services/stub-authenticator.ts) and [rmf-web/packages/api-server/api\_server/default\_config.py at main · open-rmf/rmf-web · GitHub](https://github.com/open-rmf/rmf-web/blob/main/packages/api-server/api_server/default_config.py)

For our demos we are using a hardcoded secret, which produces these hardcoded tokens, and can be used for access outside of `rmf-web`.

```auto
curl -H 'Accept: application/json' -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzdHViIiwicHJlZmVycmVkX3VzZXJuYW1lIjoidXNlciIsImlhdCI6MTUxNjIzOTAyMiwiYXVkIjoicm1mX2FwaV9zZXJ2ZXIiLCJpc3MiOiJzdHViIiwiZXhwIjoyMDUxMjIyNDAwfQ.vK3n4FbshCykQ9BW49w_7AfqKgbN9j2R3-Qh-rIOt_g" http://localhost:8000/tasks

```

If you’re setting up a full deployment stack, you’ll need to use an authentication tool like `keycloak` to allow proper authentication and tokens, you can check out [GitHub - open-rmf/rmf\_deployment\_template: This repo provides a template to deploy RMF](https://github.com/open-rmf/rmf_deployment_template) for that

* * *

**This is the chosen answer.**
