This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.

⚠️ We've moved!

Hi there!

To reduce project dependency on 3rd party paid services the StackStorm TSC has decided to move the Q/A from this forum to Github Discussions. This will make user experience better integrated with the native Github flow, as well as the questions closer to the community where they can provide answers.

Use 🔗 Github Discussions to ask your questions.

401 Unauthorized error chatops with hubot-stackstrom plugin

I tried starting hubot with hubot-stackstrom adaptor, resulted in 401 unauthorized error even though i generated new API key

[root myhubot]# bin/hubot
Dilipkumarvarma> INFO Using ST2_API_KEY as authentication. Expiry will lead to bot exit.
WARNING No supported formatter found for shell. Using DefaultFormatter.
WARNING No post handler found for shell. Using DefaultFormatter.
INFO Loading commands…
INFO hubot-redis-brain: Using default redis on localhost:6379
INFO hubot-redis-brain: Data for hubot brain retrieved from Redis
ERROR Failed to retrieve commands from “https://127.0.0.1:443/api”: Unauthorized - ApiKey with key_hash=3b5c98ecff5214dc7707bd882d0b433d5b96d976bef209ad8edc6a932c607b6e5eaf0a66fe71c73d553ddf4bb8712c5062b9970051b639075b8ac53fd4122cca not found.
ERROR Stream error: Event { type: ‘error’, status: 401 }

Thanks

Try doing a simple CLI or API test to execute an action using the API key you generated. Does that work?

HI,

I did basic checks like curl to API URL with newly generated API key, works fine, bit not from Hubot.
Hubot connects to Stackstrom but receives 401 error.

Thanks

Then check that you have correctly pasted the key into st2chatops.env.

There’s no magic here - it’s using that key to make an HTTP call, exactly the same as if you use curl.

Also check your RBAC configuration if you have that enabled.

Hi Lindsay,

Thanks alot for the help, I am able to integrate Hubot with Stackstrom successfully and able to execute basic commands like st2 list actions.

Issue is with API Key assigned with Auth token in Hubot.

Next step is to integrate with Flowdock, will reach out to if i get into an issue.

Thanks