I am using the JIRA REST API for Java.
Today all of a sudden I am getting the following error.
Exception in thread "main" com.mashape.unirest.http.exceptions.UnirestException: java.lang.RuntimeException: java.lang.RuntimeException: org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1]
at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:143)
at com.mashape.unirest.request.BaseRequest.asJson(BaseRequest.java:68)
This happens always at this part of my code:
HttpResponse response = Unirest.get("https://your-domain.atlassian.net/rest/agile/1.0/board") .basicAuth("email@example.com", "") .header("Accept", "application/json") .asJson();
which is taken from the official JIRA website: Jira Software Cloud REST API reference
Of course, the parts of the code above such as the URL, Password and username were replaced accordingly.
The code was working perfectly until today 2019.03.20.
Hi @georgiossalon ,
You shall reset the CAPTCHA count and account will be enabled for auth through REST API again. This is a security feature made to prevent many kind of attacks including DDoS!
Hope this helps!
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
Unfortunately I do think you can't reset the CAPTCHA through the API, that being said, there is no CAPTCHA by default, it's enabled after unsuccessful logins so you should not need it too often!
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @PBTesting ,
Resetting the CAPTCHA means setting to 0 the wrong login count (which triggers the CAPTACHA after 3 wrong logins).
That can be done by a Jira admin on a user profile! You can get more details here:
https://confluence.atlassian.com/doc/configuring-captcha-for-failed-logins-216957808.html
Hope this helps!
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found out it happens because of the captcha. Is there a way to avoid such things through the code?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.