Log In

Log In



Not registered yet?


Reset password Activation link
Forums
Tag "java"

Received 401 Unauthorized response with REST request

Publication date: August 8, 2018

I am trying to fetch all form records using the documented pattern ‘/apps/APP_ID/dtypes/entity/ENTITY_ID.json’ in Java 8, with Retrofit2, and Gson to handle JSON stuff, but I received 401 response no matter how I try.
The complete URL can produce valid response in Chrome browser, but receives only brackets([]) in Safari.
I tried to set an API key in the body, but the Retrofit framework complained that body is not acceptable in a GET method. That seems to violate the specifications of HTTP 1.1.
Then I tried to use POST method instead, got the same 401 response.
I have no idea. Is there any operational sample written in Java?