---
title: OAuth2TokenExchangeContext
description: When the OAuth2TokenExchangeFilter succesfully issues a token, it injects the issued token and its scopes into this context.
component: pinggateway
version: 7.2
page_id: pinggateway:reference:OAuth2TokenExchangeContext
canonical_url: https://docs.pingidentity.com/pinggateway/2026/reference/OAuth2TokenExchangeContext.html
llms_txt: https://docs.pingidentity.com/pinggateway/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: 2025-06-02T16:30:54Z
superseded_by: https://docs.pingidentity.com/pinggateway/2026/reference/OAuth2TokenExchangeContext.html
section_ids:
  OAuth2TokenExchangeContext-properties: Properties
  OAuth2TokenExchangeContext-moreinfo: More information
---

# OAuth2TokenExchangeContext

When the [OAuth2TokenExchangeFilter](Filters.html#OAuth2TokenExchangeFilter) succesfully issues a token, it injects the issued token and its scopes into this context.

## Properties

The context name is `OAuth2TokenExchangeContext`, and is accessible at `${contexts.oauth2TokenExchange}`.

The context has the following properties:

* `"issuedToken"`: [string](preface.html#definition-string)

  The token issued by the authorization server.

* `"issuedTokenType"`: [string](preface.html#definition-string)

  The token type URN.

* `"scopes"`: set of [strings](preface.html#definition-string)

  One or more scopes associated with the issued token, for example, `"scope1", "scope2", "scope3"`.

* `"rawInfo"`: raw JSON as a JsonValue

  The raw token info as issued by the authorization server.

## More information

[OAuth2FailureContext](RequestsResponsesContexts.html#OAuth2FailureContext)

[OAuth2TokenExchangeFilter](Filters.html#OAuth2TokenExchangeFilter)

[RFC 6749: Error Response](https://www.rfc-editor.org/rfc/rfc6749#section-5.2)
