400-Bad Request when using API with Java Jersey

1,238 views
Skip to first unread message

Patrick Kik

unread,
Aug 14, 2013, 7:53:55 AM8/14/13
to com_ka...@googlegroups.com
Hi,

Just today I learned about Kanbanize and it looks good!

Using the API I ran into a Bad Request-response.

This is my code, using Java and Jersey:

Client client = ClientBuilder.newClient();
WebTarget target = client.target("http://kanbanize.com/index.php/api/kanbanize").path("login").path("/format/json");
Builder request = target.request();
request.header("apikey", "foobarfoobarfoobar");
Response response = request.post(Entity.entity("{\"email\": \"patri...@xxxxxxxx.yyy", "pass": "zzzzzzzzzz"}", MediaType.TEXT_PLAIN_TYPE));

My  response is:

ScopedJaxrsResponse{ClientResponse{method=POST, uri=http://kanbanize.com/index.php/api/kanbanize/login/format/json, status=400, reason=Bad Request}}

I have tried some variations, but I keep getting a 400.

What am I doing wrong?
Thanks.

Patrick Kik

unread,
Aug 15, 2013, 4:00:54 AM8/15/13
to com_ka...@googlegroups.com
Turns out my password was to complicated...

Is was something like XLg5^GRQ2p&9bDq. I changed it to Hello1234 and that worked fine!

Nikolay Todorov

unread,
Aug 15, 2013, 4:38:02 AM8/15/13
to com_ka...@googlegroups.com
Hey Patrick,

Sorry for the delay in answering you.

This is really strange. I'm glad that you found a way to make it work but we definitely will investigate this further. Thank you for writing us.

Kind regards,
Nicky
Reply all
Reply to author
Forward
0 new messages