Please Help! Jira-connect user impersonation with Jira REST API

Hi,

I’m developing a jira-connect addon. I’d like my backend addon service to obtain information about Jira Issues for the currently signed in member’s project. I wish to do this through user impersonation using OAuth 2.0 access bearer token and the JIRA REST API.

Once I successfully, obtain a bearer token from the auth server, I send http requests to specific JIRA REST API endpoints and set my http header as
" Authorization Bearer ‘token’ ".

The issue is that the endpoint responses with the following message:

{“error”:“Add-on ‘addon-app’ disallowed to impersonate the user because ‘no valid active user exists’”}

My app descriptor has the following field:

“scopes”: [
“READ”,
“ACT_AS_USER”
],

I used to be able to obtain information using this similar approach prior to the GDPR deprecation and I’m not quite sure why this isn’t working.

More information about OAuth process:

I obtain the bearer token similar to how it is shown on the sample.
https://bitbucket.org/atlassian/atlassian-oauth2-samples/src/master/java/OAuthTokenGetter.java

The only difference is I made it production ready (use libraries for JSON and JWT) and I pass the accountId instead of the userkey (GDPR deprecation).
"sub: urn:atlassian:connect:useraccountid: ‘accountId’ "

Thank you