Hi, I am not able to authorize in my integration app. There is using basic authorization with username and api token. So I’ve tried generate new token for my account (instead of servis account, which is used in the app) and send some requests from Postman and i get 404 for issue endpoint and 401 for myself. I am sure it worked some time ago. There is any change?
Welcome to the Atlassian developer community @RadkaKaprkov,
Both are still working for me.
But different errors from different endpoints? I wonder if there might be multiple problems. Can you provide more detail (without sharing your API Token)? Can you provide full HTTP requests, esp the construction of the Authorization
header and full URL for the myself
endpoint?
I’m using postman for test:
myself request: GET - https://arion-it.atlassian.net/rest/api/3/myself - returns 401
authorization screenshot (I use my account and api token generated yesterday)
example of issue request: GET - https://arion-it.atlassian.net/rest/api/3/issue/DEV-43 - returns 404
The both works fine if I send it from chrome browser where I am logged, so I am sure I have permission for see it. I used postman in past and it worked, I’ve just changed values of variables.
In app I have the same construction of authorization:
_httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(Encoding.ASCII.GetBytes($"{Environment.GetEnvironmentVariable("JIRA_USERNAME")}:{Environment.GetEnvironmentVariable("JIRA_API_TOKEN")}")));
In production happens strange thing, sometimes it works fine, sometimes the issue endpoint returns 404 (with another account and API token). When I try to debug it, I always get 404… so then I tried postman with new api token.
Thanks for sharing that. I can’t see anything here that could explain the status codes you’re seeing. Further investigation will likely require exchanging private information or getting into the logs. As such, I recommend taking this case to developer support.