- Previous: Overview
- Up: Overview
- Next: Oauth 2.0 Topics
Platform Introduction
**Note:** To access all documentation be sure you are registered and Sign In. Non-signed in users can only access publicly available documentation.
The Cisco APIs Console gives you direct access to Cisco’s APIs, which in turn, gives you access to the data and resources they provide. Our APIs help you manage, configure, and scale your applications that use Cisco data. Whether you need information to support the sale of Cisco’s hardware and software products, to support your Cisco Service needs, or for your mobile applications; the Cisco API Console will scale to meet your needs.
## Our Platform
The Cisco API Console is an easy-to-use resource for our partners, customers, and internal developers who need to access APIs to get Cisco data and services. The API Console provides an intuitive, secure experience to help you learn about and integrate our API's. Whether you are building Web applications, mobile apps, or smart devices, the Console will help you integrate your internal tools, systems, and applications in a simple, secure, scalable manner. The API Console guides you through the steps necessary to register applications; use sample code, obtain tokens, and select the proper grant types for your application(s). The Console supports secure data and credentials, using industry standard authentication and role-based authorization.
## Getting Started
Once you are logged in, you can access to all the APIs available to you and get detailed information about each API.
## Introduction
This section will explain the steps needed to be taken to on-board to Web APIs provided by Cisco. This section will cover obtaining a user account, assigning party and role assignments to that user account for a specific company, and using Cisco's API Console for the registration of a client application that will call Cisco's Web APIs.
These instructions are intended for Cisco's Customers or Partners that intend to create client applications from Cisco Provided APIs.
## Prerequisites
There are four prerequisites needed before a user can initiate the API service calls and obtain access to the product information available from the tenants. The first two steps consist of user and application registration; while the last two steps are related to development and metrics use. The steps necessary are:
1. Perform Onboard Registration: This is for user registration. This process, also referred to as on-boarding, is where the following actions take place:
* User registers for a CCO ID--or they may use their existing one if they have already registered with Cisco--and is then nominated by a Cisco Administrator to become a Delegated Administrator (DA).
* The DA will associate other CCO ID users to a company and assign them roles, which gives them access to the API console. Only one DA is assigned by Cisco, however, that DA may assign other users to the role of DA.
2. Registration of a client application creates a “unique client identifier” that will identify your client application to the Cisco Token services.
* Registration creates the client credentials along with name assignment, description, and subscribes the client application to one (1) or more of the OAuth v2.0 grant types requested for their client application.
* Registration also subscribes the client application to one (1) or more of the APIs provided by Cisco.
3. Develop Application
This is the client code developed by the customer or partner.
4. Utilize Cisco's Token services to acquire an OAuth v2.0 access-token(s).
Once these steps have been completed successfully, the user can then place API calls to their chosen APIs. Once calls have been made to the APIs, the user can review various usage and performance metrics that are associated with the API service calls.
# Register New Application
1. Login to developer portal at https://apiconsole.cisco.com
2. Click on “My apps and keys” and you will see all your existing applications with the API lists for the applications. You will see deprecated word in the API name for your existing applications. Make a note of all API’s listed here. You will need this list while registering new applications.

3. You can right click on “Register a New App” and select “open link in new tab”. This way you can have list of existing applications open in one tab and “register new app” on another tab.
4. “Register a New App” page has changed. Primarily related to “Application Type” and “Grant Type”. Your selection of “Application Type” will change the “Grant Type” offered.

5. Take a note of “Grant Type” listed on the existing application on the “My Apps and Keys” page under “Applications” section. You may be required to register multiple applications if you are using same application for different grant types today.
6. Follow following table for selecting right “Application Type” to get exact “Grant Type” in your existing application.
| Application Type | Grant Type |
| --- | ----- |
|Browser (SPA) | authorization code with PKCE, implicit |
| native | authorization code with PKCE, implicit, resource owner password, refresh token |
| Web (Server) | authorization code, implicit, refresh token |
| Service | client credentials |
7. Once you have selected the right “Application type” and “Grant type”, you can take a note of “API’s” listed on existing application. Select the same list of “API’s” while registering new application. Here you will select same API’s without the deprecated word in it. Note that you won’t see deprecated API’s list while registering.
8. Agree to terms of service and click on “Register”.
9. You will get the new application details in email as well as you can view it by clicking “My apps and keys”. Note down client id and secret for the application which you will use to generate the token.
### Example:
This example shows Application creation for HelloWorld API with Application Type as “Service” and Grant Type = “Client Credentials”

---
**Now Select HelloWorld check box from the api list below.**

---
**Now you will select the checkbox for terms of service and click on "Register"**

---
**Then your application will get registered and you will be able to see its details under "My Apps & Keys"**

## Getting Access Token
When the application is registered in the APIConsole, and one or more of the grant types were chosen to use with that specific client application, it is only permitted to make token requests with the grant types chosen.
Use the Application details from earlier step (Key / client id , secret) and Application Type and Grant Type information used to get the token.
Steps required to get the token will vary depending on the Grant Type. You can find the steps for each grant type [here.](https://apiconsole.cisco.com/docs/read/overview/Oauth_20_Topics)
### Example - Getting token for client credentials
'/token' endpoint https://id.cisco.com/oauth2/default/v1/token
'/authorize' endpoint https://id.cisco.com/oauth2/default/v1/authorize
(you will not need authorize endpoint call with client credentials)
With your token request also pass following header. **'Content-Type: application/x-www-form-urlencoded'**
1. Use your newly created “Client id” and “Secret” with the token generation URL for generating a token.
**Example** For Application created using “Application Type” = “Service” and “Grant Type” = “Client Credentials”
```
https://id.cisco.com/oauth2/default/v1/token?grant_type=client_credentials&client_id=XXXXXXXXXXXXX&client_secret=XXXXXXXXXXXXXX
```
Its important to pass following header with the token generation call Without it you won’t your token call won’t be successful.
**Content-Type: application/x-www-form-urlencoded**
2. Token generation call using Postman:

3. Token generation using curl
```
curl --location --request POST \
'https://id.cisco.com/oauth2/default/v1/token?grant_type=client_credentials&client_id=pahfekfcjhk8w2hwpjffydgt&client_secret=Qv59wJ6nDAK7mQTPrJxCZ5zZ' \
--header 'Content-Type: application/x-www-form-urlencoded'
```
## Make API Call using the token generated earlier
Now it’s time to make an API call since you have generated the “token” with the newly created application details. You will pass the header Authorization: Bearer *token*
**Example for hello API call using client credentials
Hello API endpoint https://apix.cisco.com/hello
Example API call: Hello API call using "client credentials" as Grant Type.
### Postman:

### Curl:
curl --location 'https://apix.cisco.com/hello' --header 'Authorization: Bearer ecrnfSYF[...]AbYB6hQix'
You can refer to API specific documentation to know more about specific API you are trying to use. You can also use search button on top right corner to do search.
- Previous: Overview
- Up: Overview
- Next: Oauth 2.0 Topics