Forums

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

REST API to change token

jszhang
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!
November 29, 2021

I have a requirement to automatically change service account Jira Token before expiration,  but it seems I can't find right one, please point me to right document.

 

Thanks

1 answer

1 accepted

1 vote
Answer accepted
Darryl Lee
Community Champion
November 29, 2021

This is possible with Server/Data Center: Creating PATs using REST API 

But I'm not finding anything similar for Cloud: Manage API tokens for your Atlassian account 

I believe that @Veera meant to say here that there is NOT "a REST END point which can be used to create API token on behalf of a user".

Further, Hans Z. on stackoverflow.com makes a good point:

Typically not because to access such an API you'd need an API token. Accessing such an API with username/password defeats some of the principles behind API/access tokens.

 

jszhang
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!
December 1, 2021

Thanks, I guess we have to manually renew it.

Darryl Lee
Community Champion
December 1, 2021

Yeah, sorry for the bad news. Could you please Accept my answer? Thanks!

Like jszhang likes this
Jatin Jaiswal
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!
March 8, 2022

Hi @Darryl Lee 

So did you mean that we cannot use REST API to get PAT?

Is there any workaround rather than doing it manually we require to automate this PAT process and fetch it from the response body.

Thanks,

Jatin

Suggest an answer

Log in or Sign up to answer