title: Okta: How to retrieve Access Token via SessionToken (JavaScript)
body: <p>Im able to fetch the &quot;sessionToken&quot; via the Okta API, however how am I able to retrieve the AccessToken with the &quot;sessionToken&quot;?</p>
  <p>I am using the JS SDK: <a href="https://github.com/okta/okta-auth-js" rel="nofollow noreferrer">https://github.com/okta/okta-auth-js</a></p>
  <pre class="lang-js prettyprint-override"><code>let oktaConfig2 = {
    issuer: &quot;https://{OKTA_DOMAIN}/oauth2/default/v1/authorize&quot;
  };
  
  const oktaAuth2 = new OktaAuth(oktaConfig2);
  
      oktaAuth2.token
        .getWithoutPrompt({
          responseType: &quot;id_token&quot;,
          sessionToken: sessionToken2,
        })
        .then(function (data2) {
          console.log(data2);
        });
  </code></pre>
  <p>I receive an error 404 in the response.</p>
  <p>Any ideas?</p>
  <p>TIA</p>