# Unable to hit rasa-x http api on kubernetes

**URL:** <https://forum.rasa.com/t/unable-to-hit-rasa-x-http-api-on-kubernetes/29123>\
**Category:** \[Deprecated\] Rasa X Community Edition\
**Created:** [May 20, 2020, 10:48pm UTC](https://forum.rasa.com/t/unable-to-hit-rasa-x-http-api-on-kubernetes/29123 "2020-05-20T22:48:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![varunc](https://avatars.discourse-cdn.com/v4/letter/v/8797f3/32.png) [@varunc](https://forum.rasa.com/u/varunc)\
**Post date:** [May 20, 2020, 10:48pm UTC](https://forum.rasa.com/t/unable-to-hit-rasa-x-http-api-on-kubernetes/29123/1 "2020-05-20T22:48:44Z")

</div>

I have used the helm chart and the instructions from [here](https://rasa.com/docs/rasa-x/installation-and-setup/openshift-kubernetes/#using-helm-to-generate-object-configurations) to deploy a test rasa-x setup on my kubernetes cluster. I then added some training data and trained and ran a model.

Now I am trying to use the http api to take actions on this bot, but nothing is working. I’ve tried port-forwarding every single pod/service/deployment to my localhost and tried hitting the api. But I keep getting `Unauthorized`. I’ve exec’d into each of the pods and checked the JWT\_TOKEN and am passing the same exact token through the api, but no luck.

```auto
$ curl -H "Content-Type: application/json" -H "Authorization: Bearer abc123" -X GET localhost:5002/api/conversations?token=abc123 -d '
{
  "sender": "sender123",
  "message": "Hello"
}'
{"reasons":["Auth required."],"exception":"Unauthorized"}

```

 ![Screen Shot 2020-05-20 at 3.52.49 PM](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/7/7f03d70c7084e59d90b730a47cbce489869bf4e5.jpeg)

The only http API I am able to get working is:

```auto
$ curl -XGET localhost:5002/api/chatToken?token=abc123
{"chat_token":"33 *************","bot_name":"*** @***.com","description":"","expires":1592175500}
$ curl -XGET localhost:5002/api/config?token=abc123
{"credentials":"rasa:\n url: http:\/\/rasa-test-release-rasa-x-rasa-x:5002\/api\n","endpoints":"models:\n url: ${RASA_MODEL_SERVER}\n token: ${RASA_X_TOKEN}\n wait_time_between_pulls: 10\ntracker_store:\n type: sql\n dialect: \"postgresql\"\n url: rasa-test-release-postgresql\n port: 5432\n username: postgres\n password: ${DB_PASSWORD}\n db: ${DB_DATABASE}\n login_db: rasa\nevent_broker:\n type: \"pika\"\n url: \"rasa-test-release-rabbit\"\n username: \"user\"\n password: ${RABBITMQ_PASSWORD}\n port: 5672\n queue: ${RABBITMQ_QUEUE}\naction_endpoint:\n url: \"http:\/\/rasa-test-release-rasa-x-app:5055\/webhook\"\n token: \"\"\nlock_store:\n type: \"redis\"\n url: rasa-test-release-redis-master\n port: 6379\n password: ${REDIS_PASSWORD}\n db: 1\n"}

```

_ **Solution** _

Turns out the Bearer token I needed to pass was not the JWT\_TOKEN I created initially, but was the token I get after running:

```auto
curl -H "Content-Type: application/json" -X POST rasa-dev-api-staging.mist.pvt/api/auth -d '
{
  "username": "me",
  "password": "abc123"
}'

```
