cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
985
Views
10
Helpful
1
Replies

WxCC API - using Try Out option

e-pudge
Level 1
Level 1

Hello,

 

I'm just starting to look into APIs for WxCC and was looking through the documentation  but seem to be enable to use Try Out option on any of the links. E.g. https://developer.webex-cx.com/documentation/dial-plan/v1/list-dial-plans

 

Each time - I get an error back saying the org id I enter doesnt exist. I'm using a personal token at this point - however, my account is WCH Full admin and WxCC admin and the org id is taken directly from WCH.

 

I'm clearly missing something simple?

 

thanks

1 Accepted Solution

Accepted Solutions

Arunabh Bhattacharjee
Cisco Employee
Cisco Employee

Hi,

 

So to use the access_token on an organization, that access token should have the scopes required to perform the operation.

cjp:config, cjp:config_read, cjp:config_write are provided to all tenant administrators on an org with a Webex Contact Center feature.

 

Second, developer.webex-cx.com is for US

devportal.wxcc-eu1.cisco.com is for EU1(UK)

devportal.wxcc-eu2.cisco.com is for EU2(Frankfurt)

devportal.wxcc-anz1.cisco.com is for ANZ(APAC)

 

The developer Portal uses the "Org" level access token for the Admin. i.e if you login to the dev portal with user@org.com, you can only access org.com's data if you use personal access token. to fetch other orgs, you can get the access tokens that are on the partner level as explained below.

 

E.g 1: The user from Org A, and admin on Org A. User just logged into the dev portal, and is using list dial plans for Org B, it will fail.

This is be design. OAuth2 collects the access token on behalf of the administrator user of that org (this is the basis for authorization code). 

 

E.g 2: The user is from Org A. It so happens that Org A is a partner org. User is a partner admin for Org B, Org C. They login to the developer portal and attempt to list dial plans for Org B and Org C.

Today, this will fail because the scopes are only requested for the org. We will enhance this on the developer portal to support partner Org logins that have access to other customer orgs.

 

however I am attaching a screenshot of manually entering the partner admin access token in the form where it is successful.

They will be able to list dial plans for other orgs because they are full admins on the other orgs, even though they are external admins.

The access token can be retrieved from admin.webex.com > local storage > access_token you should be able to retrieve a partner org access token and then use that for multiple orgs.

 

Today, 1 access token tags 1 org. It is inside of the access token, this is the syntax

accessToken_ciClusterID_orgID

 

The sample is available on : https://github.com/CiscoDevNet/webex-contact-center-api-samples/tree/main/app-auth-sample

 

To query multiple orgs as an application, one must "onboard" (button click > OAuth2 flow > collect access token) for the org using the admin of the org. To manage multiple orgs and maintain access tokens to multiple orgs, you can look at the sample at: https://github.com/CiscoDevNet/webex-contact-center-api-samples/tree/main/token-app-sample

 

Let me know if you have any queries on this.

 

Thanks & Regards,

Arunabh.

 

Screen Shot 2022-04-22 at 2.15.54 PM.pngScreen Shot 2022-04-22 at 2.15.43 PM.png

 

View solution in original post

1 Reply 1

Arunabh Bhattacharjee
Cisco Employee
Cisco Employee

Hi,

 

So to use the access_token on an organization, that access token should have the scopes required to perform the operation.

cjp:config, cjp:config_read, cjp:config_write are provided to all tenant administrators on an org with a Webex Contact Center feature.

 

Second, developer.webex-cx.com is for US

devportal.wxcc-eu1.cisco.com is for EU1(UK)

devportal.wxcc-eu2.cisco.com is for EU2(Frankfurt)

devportal.wxcc-anz1.cisco.com is for ANZ(APAC)

 

The developer Portal uses the "Org" level access token for the Admin. i.e if you login to the dev portal with user@org.com, you can only access org.com's data if you use personal access token. to fetch other orgs, you can get the access tokens that are on the partner level as explained below.

 

E.g 1: The user from Org A, and admin on Org A. User just logged into the dev portal, and is using list dial plans for Org B, it will fail.

This is be design. OAuth2 collects the access token on behalf of the administrator user of that org (this is the basis for authorization code). 

 

E.g 2: The user is from Org A. It so happens that Org A is a partner org. User is a partner admin for Org B, Org C. They login to the developer portal and attempt to list dial plans for Org B and Org C.

Today, this will fail because the scopes are only requested for the org. We will enhance this on the developer portal to support partner Org logins that have access to other customer orgs.

 

however I am attaching a screenshot of manually entering the partner admin access token in the form where it is successful.

They will be able to list dial plans for other orgs because they are full admins on the other orgs, even though they are external admins.

The access token can be retrieved from admin.webex.com > local storage > access_token you should be able to retrieve a partner org access token and then use that for multiple orgs.

 

Today, 1 access token tags 1 org. It is inside of the access token, this is the syntax

accessToken_ciClusterID_orgID

 

The sample is available on : https://github.com/CiscoDevNet/webex-contact-center-api-samples/tree/main/app-auth-sample

 

To query multiple orgs as an application, one must "onboard" (button click > OAuth2 flow > collect access token) for the org using the admin of the org. To manage multiple orgs and maintain access tokens to multiple orgs, you can look at the sample at: https://github.com/CiscoDevNet/webex-contact-center-api-samples/tree/main/token-app-sample

 

Let me know if you have any queries on this.

 

Thanks & Regards,

Arunabh.

 

Screen Shot 2022-04-22 at 2.15.54 PM.pngScreen Shot 2022-04-22 at 2.15.43 PM.png