> ## Documentation Index > Fetch the complete documentation index at: https://support.fortanix.com/llms.txt > Use this file to discover all available pages before exploring further. # Authenticate with a token > Authenticate using the Oauth 2.0 Client Credentials flow. To call this you must provide the form url encoded app ID and the form url encoded API key in the form of a Basic auth header. ## OpenAPI ````json POST /api/v1/iam/session/oauth2/token { "openapi": "3.0.0", "info": { "description": "**API of the Fortanix Unified Data and AI Security Platform**\n\nThe API client *must* follow HTTP redirects, including 308 redirects. Many HTTP libraries (such as Python Requests, JavaScript fetch) do this by default. With cURL, you must pass `--location`.\n", "title": "Armor API", "version": "0.1.0" }, "servers": [ { "url": "https://api.armor.fortanix.com" } ], "tags": [ { "description": "APIs regarding creating or ending a session.", "name": "Authentication" }, { "description": "APIs regarding obtaining details about the connection.", "name": "DiscoveryConnection" }, { "description": "APIs regarding obtaining details about the policies.", "name": "DiscoveryPolicies" }, { "description": "APIs regarding obtaining details about the scans.", "name": "DiscoveryScan" }, { "description": "APIs regarding obtaining the reports related to AWS.", "name": "DiscoveryAwsReports" }, { "description": "APIs regarding obtaining the reports related to Azure.", "name": "DiscoveryAzureReports" }, { "description": "APIs regarding obtaining the reports for Services.", "name": "DiscoveryServicesReports" }, { "description": "APIs regarding obtaining the PQC reports.", "name": "DiscoveryPqcReports" }, { "description": "APIs regarding obtaining the reports related to DSM.", "name": "DiscoveryDsmReports" }, { "description": "APIs regarding obtaining the details about the inventory objects.", "name": "DiscoveryInventory" }, { "description": "APIs regarding obtaining the reports related to On-Prem infrastructure.", "name": "DiscoveryOnPremReports" }, { "description": "APIs regarding obtaining the details about the inventory objects associated to a scan.", "name": "DiscoveryScanInventory" } ], "paths": { "/api/v1/iam/session/oauth2/token": { "post": { "description": "Authenticate using the Oauth 2.0 Client Credentials flow.\n\nTo call this you must provide the form url encoded app ID and the form url encoded API key in the form of a Basic auth header.\n", "operationId": "OauthToken", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "properties": { "grant_type": { "enum": [ "client_credentials" ], "type": "string" } } } } }, "description": "Conforms to RFC 6749 Section 4.4.2.", "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OauthTokenResponse" } } }, "description": "Success result." }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OauthTokenError" } } }, "description": "Invalid credentials." } }, "summary": "Authenticate with a token.", "tags": [ "Authentication" ] } } }, "components": { "schemas": { "OauthTokenResponse": { "example": { "access_token": "2YotnFZFEjr1zCsicMWpAA", "expires_in": 3600, "token_type": "Bearer" }, "properties": { "access_token": { "type": "string" }, "expires_in": { "description": "Token lifetime in seconds.", "type": "integer" }, "token_type": { "type": "string" } }, "required": [ "access_token", "token_type", "expires_in" ], "type": "object" }, "OauthTokenError": { "properties": { "error": { "$ref": "#/components/schemas/OauthTokenErrorCode" }, "error_description": { "type": "string" }, "error_uri": { "type": "string" } }, "required": [ "error", "error_description" ], "type": "object" }, "OauthTokenErrorCode": { "description": "Conforms to RFC 6749 Section 5.2.", "enum": [ "invalid_client", "invalid_grant", "invalid_request", "invalid_scope", "unauthorized_client", "unsupported_grant_type" ], "type": "string" } } } } ````