How I can get a refresh token to be used for REST API calls to fetch data from atlassian

Sunil kumar
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!
June 13, 2023

I am using Webhook to get data from JIRA to our app. But there are some scenarios where I am not getting data from webhooks. So I have decided to use the REST APIs as well.

Now when I am trying to get a refresh token as per the documentation which says to pass a refresh token inside the POST request  '/oauth/token', But I don't get the refresh token from this endpoint.

I’ve added 

'grant_type' => 'authorization_code',
'client_id' => myclientId,
'client_secret' => myclientSecret,
'code' => authorization-code-received,
'redirect_uri' => myredirectUri,
to the request  and post URL is  https://auth.atlassian.com/oauth/token

The response I am getting is

[access_token] => xxxxxxxxxxxxxxxxxxx
    [expires_in] => 3600
    [token_type] => Bearer
    [scope] => manage:jira-project manage:jira-configuration manage:jira-data-provider read:jira-work manage:jira-webhook write:jira-work read:jira-user

 

Please let me know if I am doing anything wrong Or what I can do to get the refresh token which could be used for the other API calls later.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events