OAuth 2 server to server

Hi everyone,
I’m starting a new integration for Jira cloud and my external server.

I want to create, from my external server, new issues in Jira via Rest API.
I want to use OAuth2 but I saw that, in order to get the Auth Code, it’s mandatory to show a web page where the user can grant access to the API to my Jira cloud.

https://auth.atlassian.com/authorize?
  audience=api.atlassian.com&
  client_id=YOUR_CLIENT_ID&
  scope=REQUESTED_SCOPE_ONE%20REQUESTED_SCOPE_TWO&
  redirect_uri=https://YOUR_APP_CALLBACK_URL&
  state=YOUR_USER_BOUND_VALUE&
  response_type=code&
  prompt=consent

I need to skip this part because it will be a server to server integration, so I need to get this Auth code from a web request.

How can I use OAuth 2 without showing any user interface?

This is the doc I followed: https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/

Thanks,

D.

If the action is initiated by a user, then the client has to show the login web page, send proper parameters to your server and your server can continue OAuth2 communication with the Atlassian server.

If it’s some kind of automatic (e.g. scheduled) action, then workaround may be to use Basic auth for REST APIs

Hi OdenjMadek,
thank you for your response.

Unfortunately the Basic Auth it’s not a solution for this client.

I don’t think there is a solution for now, so I put the project in pause.

Regards,

D.