Basic auth for REST APIs: token is "Never Accessed"

Mila Shutova March 9, 2021

Hi all!
previously I thought I managed to log in, but it turns out as nopes due to token is not being  Accessed

I use:
"String response = given().header("Content-Type", "application/json").body("{ \"username\": \"pavlovamila31@gmail.com:hidden\"}").log().all().filter(session).get("/rest/api/2/issue/createmeta").then().log().all().
extract().response(). asString();"

And get as the result:

HTTP/1.1 200 OK
Server: AtlassianProxy/1.15.8.1
vary: Accept-Encoding
cache-control: no-cache, no-store, no-transform
Content-Type: application/json;charset=UTF-8
content-encoding: gzip
Strict-Transport-Security: max-age=315360000; includeSubDomains; preload
Date: Tue, 09 Mar 2021 13:20:24 GMT
ATL-TraceId: 9d398c8211d43159
x-arequestid: 5e8cb74e-696a-44fc-81d0-7532b60980e5
X-XSS-Protection: 1; mode=block
Transfer-Encoding: chunked
timing-allow-origin: *
x-envoy-upstream-service-time: 33
X-Content-Type-Options: nosniff
Connection: keep-alive
set-cookie: atlassian.xsrf.token=71379fdf-de3b-45ae-b570-418c0af1bc7c_2bce863d786da32492b2ef85ef1eb915d581b10f_lout; Path=/; Secure
Expect-CT: report-uri="https://web-security-reports.services.atlassian.com/expect-ct-report/global-proxy", enforce, max-age=86400

{
"expand": "projects",
"projects": [

]

Looked good to me, but it seems as I never use my token and I bet this is why other requests result in 404 error.
What do I do wrong? I guess I don't really understand how to convert "curl"  from https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/#simple-example to what I need 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM Trial
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events