Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to access json data from SmartThings(Cloud) Jira

code.guru
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 3, 2020

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.

 

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 13, 2020

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events