Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you