openapi: 3.1.0 info: title: ForgeRock Access Management Access Requests OAuth2 API description: REST API for ForgeRock Access Management (AM) providing authentication, authorization, session management, and policy evaluation. Supports OAuth 2.0 and OpenID Connect flows, authentication trees/journeys, policy-based authorization decisions, and realm management. version: 7.3.0 contact: name: ForgeRock url: https://www.forgerock.com license: name: Proprietary url: https://www.forgerock.com/terms x-provider: forgerock x-api: access-management servers: - url: https://{deployment}/am description: ForgeRock Access Management server variables: deployment: default: am.example.com description: The AM deployment hostname security: - ssoToken: [] - bearerAuth: [] tags: - name: OAuth2 description: OAuth 2.0 token and authorization endpoints paths: /oauth2/realms/root/realms/{realm}/authorize: get: operationId: oAuth2Authorize summary: ForgeRock OAuth 2.0 authorization endpoint description: Initiates an OAuth 2.0 authorization code or implicit grant flow. Redirects the user agent to authenticate and consent. tags: - OAuth2 parameters: - $ref: '#/components/parameters/RealmPath' - name: client_id in: query required: true schema: type: string - name: response_type in: query required: true schema: type: string enum: - code - token - id_token - name: redirect_uri in: query required: true schema: type: string format: uri - name: scope in: query schema: type: string - name: state in: query schema: type: string responses: '302': description: Redirect to login or consent '400': description: Invalid request content: application/json: schema: $ref: '#/components/schemas/OAuthError' /oauth2/realms/root/realms/{realm}/access_token: post: operationId: oAuth2Token summary: ForgeRock OAuth 2.0 token endpoint description: Exchange credentials for access tokens. Supports authorization_code, client_credentials, refresh_token, password, and device_code grants. tags: - OAuth2 parameters: - $ref: '#/components/parameters/RealmPath' requestBody: required: true content: application/x-www-form-urlencoded: schema: type: object required: - grant_type properties: grant_type: type: string enum: - authorization_code - client_credentials - refresh_token - password code: type: string redirect_uri: type: string refresh_token: type: string scope: type: string responses: '200': description: Access token response content: application/json: schema: $ref: '#/components/schemas/TokenResponse' '400': description: Invalid grant content: application/json: schema: $ref: '#/components/schemas/OAuthError' /oauth2/realms/root/realms/{realm}/tokeninfo: get: operationId: oAuth2TokenInfo summary: ForgeRock OAuth 2.0 token introspection description: Retrieve information about an access token including its scope, expiration, and associated client. tags: - OAuth2 parameters: - $ref: '#/components/parameters/RealmPath' - name: access_token in: query required: true description: The access token to introspect schema: type: string responses: '200': description: Token information content: application/json: schema: $ref: '#/components/schemas/TokenInfo' '401': description: Invalid or expired token content: application/json: schema: $ref: '#/components/schemas/OAuthError' components: parameters: RealmPath: name: realm in: path required: true description: The realm name schema: type: string default: root schemas: TokenInfo: type: object description: Token introspection result properties: access_token: type: string grant_type: type: string scope: type: array items: type: string realm: type: string token_type: type: string expires_in: type: integer client_id: type: string OAuthError: type: object description: OAuth 2.0 error response properties: error: type: string error_description: type: string TokenResponse: type: object description: OAuth 2.0 token response properties: access_token: type: string token_type: type: string expires_in: type: integer refresh_token: type: string scope: type: string id_token: type: string securitySchemes: ssoToken: type: apiKey in: header name: iPlanetDirectoryPro description: AM SSO token obtained from authentication bearerAuth: type: http scheme: bearer bearerFormat: JWT description: OAuth 2.0 access token