{
  "openapi": "3.1.0",
  "info": {
    "title": "security",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{OrangeLogicURL}/webapi/security",
      "variables": {
        "OrangeLogicURL": {
          "default": "OrangeLogicURL"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://example.com/oauth2/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/oauth2/token_48I_v1": {
      "post": {
        "summary": "OAuth 2.0 token",
        "description": "Create a token to allow a third-party application to authenticate API calls to Orange Logic",
        "operationId": "oauth-2-token",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "client_id",
                  "client_secret",
                  "grant_type",
                  "code"
                ],
                "properties": {
                  "client_id": {
                    "type": "string",
                    "description": "The client ID from the third-party application’s account in Orange Logic."
                  },
                  "client_secret": {
                    "type": "string",
                    "description": "The client secret from the third-party application’s account in Orange Logic."
                  },
                  "grant_type": {
                    "type": "string",
                    "description": "The type of authorization code you’re providing to generate the token. Enter one of two values: <code>authorization_code</code> or <code>refresh_token</code>.",
                    "default": "authorization_code"
                  },
                  "code": {
                    "type": "string",
                    "description": "The authorization code provided by the third-party application when you run the <a href=\"https://developer.orangelogic.com/docs/authorize-third-party-apps#run-the-authorization-call\">authorization call</a>.<br><b>Or</b>, the refresh token that you generated with a previous call."
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "client_id": "W3nQ1XTu3QkcAmkgJuz6HGF68kMsCptAHmI-Z9eKF5w",
                    "client_secret": "Ibehv1i4tdJyOo8imbntLMioMZXwMIttIcmDE4c1dqY",
                    "grant_type": "authorization_code",
                    "code": "179132_5_f56fd06f465f489993b02f3ff04e00ca",
                    "refresh_token": "string",
                    "code_verifier": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"access_token\": \"S1V5UjhAOUhTNjl4cWJsT0pXQ1hCMnI3TTVGNUNaQ2Rta3RqZUtNQllSZlRXSjFPOXFPYW5yUm13cmpzUzdLWmxYMHMueEdFeGNVcTBXSXJIQ3YueTBVb3ppSMJFdk9UTXFaTHV6Lld6Qjg5LkpLOXhGRlB0eklCczkzckNMQ28:,\n  \"refresh_token\": \"179132_8_4931aa01ddc74a58b5e40a6eaaea375d\",\n  \"token_type\": \"Bearer\",\n  \"expires_in\": 86400\n}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
