openapi: 3.0.0 info: description: OAuth 2.0 compliant proxy for retrieving bearer tokens. version: 2.0.0 title: Security and Authorization v2 termsOfService: '' tags: - name: OAuth 2.0 description: This API complies with the OAuth 2.0 specification. https://tools.ietf.org/html/rfc6749 - name: Auth description: Get auth token - name: client_id description: For client_credentials grant_type, this corresponds with a user name - name: client_secret description: For client_credentials grant_type, this corresponds with a password - name: grant_type description: OAuth 2.0 grant_type parameter. 'client_credentials' is currently the only supported value. paths: /apip/auth/v2/token: post: summary: Generate and return auth token for a given set of client credentials. requestBody: content: application/json: schema: $ref: '#/components/schemas/Auth_Request' description: A client credential OAuth 2.0 token request required: true responses: '200': description: Successful authorization response content: '*/*': schema: $ref: '#/components/schemas/Auth_Response_Success' '400': description: Request was not properly formed. content: '*/*': schema: $ref: '#/components/schemas/Auth_Response_Failure' '401': description: Unauthorized - the client_id and/or client_secret are invalid content: '*/*': schema: $ref: '#/components/schemas/Auth_Response_Failure' servers: - url: https://sandbox-apigw.optum.com/ components: schemas: Auth_Request: type: object properties: client_id: type: string example: BzmQjGTl7mGrD3A1koQWKtA3J2WEa4q3 client_secret: type: string example: z0NNadq12345678W grant_type: type: string description: \'client_credentials\' is currently the only supported grant_type in this API example: client_credentials Auth_Response_Success: type: object properties: access_token: type: string description: Bearer token that can be used to issue calls to other APIs demonstrating authorization example: eyJraWQiOiIxIiwidHl...w8YGHwr0w expires_in: type: integer description: Number of seconds until the token is no longer valid example: 3600 token_type: type: string description: Field explicitly stating the type of access_token. (It's always a bearer token.) example: bearer Auth_Response_Failure: type: object properties: error: type: string description: Populated with the appropriate OAuth 2.0 error code. See https://tools.ietf.org/html/rfc6749#section-5.2 error_description: type: string description: Freeform text further explaining the nature of why the call was unsuccessful x-readme: explorer-enabled: true proxy-enabled: true