Post

2 followers Follow
1
Avatar

REST API Login failure when using Primary APIKEY

Hello,

Has anyone tried accessing Clarizen REST API using APIKEY?

I am calling the following API using APIKEY in the header and getting login failure

https://api2.clarizen.com/v2.0/services/data/query?q=SELECT createdOn,title FROM Issue WHERE createdOn>2020-03-01

Error message:

   "errorCode": "LoginFailure",
    "message": "You are not authorized to access this service."
 
Thank you in advance for your help.
 
Regards,
KS
Ksave Answered

Please sign in to leave a comment.

6 comments

0
Avatar

Hi Roland,

 

Thank you for your reply to my post. I followed the steps mentioned in your post and now I am getting this error... Is there another parameter or setting that I need to set or configure?

 

Thank you in advance.

{

    "errorCode": "Internal",
    "message": "An internal error has occurred, the error was logged and will be examined.",
    "referenceId": "3GH2SmYVsxxxxxxxxxxxxxx"
}
 
 
Ksave 0 votes
Comment actions Permalink
0
Avatar

Hi there,

Could you please provide screenshots of your authentication call (body and headers) and the subsequent query call (body and headers)?

Thank you,

Roland

Roland Pumputis 0 votes
Comment actions Permalink
0
Avatar

Hi Roland,

 

Thank you again for your response.

On second try, I am able to login now. The issue was with the content-type. I was using JSON, whereas it needs to be text/plain. Once I changed the content type, login worked.

But when using Session ID, i tried to access Issue query as shown below and I am getting authorization error. I have also attached screen print for the same.

I am able to access Issues from front end

Can you please let me know if we are missing anything for the user setting to be able to query Issue via API?

 

https://api2.clarizen.com/v2.0/services/data/query?q=SELECT createdOn,title FROM Issue WHERE createdOn>2020-03-01

 

 "errorCode": "LoginFailure",
    "message": "You are not authorized to access this service.",
 
 
 
 
Ksave 0 votes
Comment actions Permalink
1
Avatar

Hi there,

Please try this:

 

This is what my headers look like:

I hope this helps.

Roland

Roland Pumputis 1 vote
Comment actions Permalink
0
Avatar

Hi Roland,

 

Removing APIKEY from Issues API call and appending Session in front of SessionID worked.

I am able to make calls now using V2 REST API.

Thank you for your responses.

Regards,

Kaustubh

Ksave 0 votes
Comment actions Permalink