Authentication and authorization quickstart for Cisco Secure Access for Government

Quick Start

This guide outlines the steps to create Cisco Secure Access API keys. With your API credentials, authenticate with the Cisco Token Authorization API and obtain an access token. Then, use your generated access token to get the Secure Access resources through the Secure Access API. Every API operation requires a valid access token.

  1. Create your API keys in Secure Access.
  2. Generate an access token with your API key credentials.
  3. Make an API request with your access token.

Create API Keys in Secure Access

For information about creating Secure Access API keys, see Secure Access Authentication.

Create API Keys with the Key Admin API

To create API keys programmatically, you can use the Secure Access for Government Admin API.

For more information, see Secure Access Key Admin API.

Generate a Secure Access API Access Token

The Secure Access Token Authorization API endpoint is:

POST https://api.secureaccessfed.cisco.com/auth/v2/token

For more information, see Getting Started with Secure Access.

Request

You can use curl to create your access token. Provide your Secure Access API key and secret.

curl --user '<key>:<secret>' --request POST --url 'https://api.secureaccessfed.cisco.com/auth/v2/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=client_credentials'

Response

Sample response (200, OK):

{
   "token_type": "bearer",
   "access_token": "xxxxxx",
   "expires_in": 3600
}

Make a Secure Access API Request

To send a request to the Secure Access API, substitute your Bearer token in the HTTP Authorization header.

In this example, your API key credentials must include the deployments key scope. For more information, see Secure Access OAuth 2.0 Scopes.

curl -L --location-trusted --request GET --url 'https://api.secureaccessfed.cisco.com/deployments/v2/regions' \
-H 'Authorization: Bearer %YourAcessToken%' \
-H 'Content-Type: application/json'