How can we get Access token from Okta using servicenow api

We are trying to get access token from okta using servicenow api script. Could anyone help on this how can I get access token.

Can you provide some more details about what you’re working on? Are you trying to log a user into an OIDC app in the Okta org, or are you trying to generate an Access Token you can use against Okta’s APIs?

Thanks @andrea for reply. Yes I am trying to generate the ID_token which will be unique for the user and using that token I want the session token for the user.

Why do you want a session token? A session token is just used to log the user into Okta and is entirely separate from an OIDC app. There is no way to get a session token from an ID token

So how can I get the ID token?


same question here.
As our user is already authenticated through okta when connecting to ServiceNow we wish to transfer the used the generated Okta token for an API connection that need to control user identity.
Would that be doable ?