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 “”: Unauthorized - ApiKey with key_hash=3b5c98ecff5214dc7707bd882d0b433d5b96d976bef209ad8edc6a932c607b6e5eaf0a66fe71c73d553ddf4bb8712c5062b9970051b639075b8ac53fd4122cca not found.
ERROR Stream error: Event { type: ‘error’, status: 401 }


(Lindsay Hill) #2

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



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.


(Lindsay Hill) #4

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.