Access token generated using refresh token gives 401 unauthorized error for cloud Jira APIs

Hello All,

I am using oauth2.0 for calling cloud Jira APIs. I generate the access and refresh tokens first using authorization code. When I call cloud Jira rest APIs then it works. After that I use refresh token to generate subsequent access token. When I use the access token generated using refresh token the same API which I called earlier gives me 401 unauthorized scope error. Does access token lose the scopes when generated using refresh token?

Thanks,
Gajanan

I found the issue . The issue was in my script.