To create a service account:
Go to Atlassian Administration. Select your organization if you have more than one.
Select Directory > Service accounts.
Select Create a service account.
For the service account name, enter an alphanumeric name with 6 to 30 characters.
For the optional description, enter the name of a person or app that uses the account.
Select roles for the apps that the service account needs to access. You can also add the service account to a group.
Select Create.
I have followed all the steps to create a service account in Atlassian Administration. Currently, I am using the REST API with Basic Authentication to fetch data.
However, I would like to know if there is a way to automatically refresh the token via a script instead of manually generating a new token each time it expires. My goal is to create the token once and handle renewal programmatically without manual intervention.
Hi @Madhav sharma
You may want to implement Oauth2 for this.
https://support.atlassian.com/user-management/docs/create-oauth-2-0-credential-for-service-accounts/
You will then be able to use the secret and client id to request a token.
Regards
Hello @Madhav sharma
If the token needs to be replaced, the normal approach is simply to create a new API token and update your integration with that new value. If needed, revoke the old one afterwards.
It looks like you're new here. Sign in or register to get started.