Hip Chat API Error vb.net

When I try to call the HipChat API from vb.net i'm getting a 400 Bad Request. I'm able to use the same info in a "Advanced Rest Client" and it works perfectly. 

Here is the code & errror. Any help would be greatly appreciated. 

http://screencast.com/t/etP8Cje4i15

2 answers

1 accepted

2 votes

Joshua,

The field names in the JSON body are case sensitive so you should be using "message" and not "Message". Hopefully I'm reading the VB code in your screenshot correctly smile

this is exactly what the problem was. my json wasn't formatted correctly message was capital, and so was the color and the values inside colors! After changing it worked! Thank you very much!!

0 vote

Hi Joshua, It is difficult to debug what's going wrong just by looking at the screenshot, might be a lot of different things.

 

Given that it works using another client I suspect the request that you send with vb.net doesn't have the same structure/parameters compared to "Advanced Rest Client" request. You can try to sniff the network and compare the requests – should give you enough data of what's going wrong.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Mar 26, 2018 in Hipchat Data Center

Migration of Hipchat server to Data Center - a retrospective

Background While our Hipchat server environment was reliable and performing well, as a significant and growing part of our business, the need to leverage the benefits of Hipchat Data Center&nbs...

458 views 2 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you