Hi All,
Although connection is established through the Rest API Client and adding corresponding dependency in the pom.xml.(dependency details shown below at the end of the details as well), but every time I am coming across with the below error message:
org.codehaus.jettison.json.JSONException: A JSONObject text must begin with '{' at character 1 of Basic auth with password is not allowed on this instance
Dependency Details as in pom.xml:
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-core</artifactId>
<version>5.1.2-2bd0a62e</version>
</dependency>
I am using the below jaraServerURL to access the same:
final String jiraServerUri = "https://smartthings.atlassian.net/";
Kindly provide information so that this issue can be resolved.
Hi,
I understand that you're using an app to make REST API calls back to your Jira Cloud site, but in the process you are getting this error of 'Basic auth with password is not allowed on this instance'.
That error happens because Atlassian deprecated support for basic auth with passwords in Jira Cloud last year. For you to see that message, it means that your REST API call is trying to use basic auth with a password. Typically when you're coding a plugin/app to use in Jira, we recommend the use of OAuth for REST APIs. OAuth is a far more secure method for authenticating, but it tends to be a bit more complicated to setup.
If for some reason you can't use OAuth, then Basic auth might still be an option if you create an API Token for this user account making the calls. Details for that are in API tokens. Basic Auth using an API Token can still work, but again the authentication has to use a header that contains the encoded authorization string. There are details on how to do this via curl in Basic auth for REST APIs.
I hope this helps.
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.