cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2966
Views
0
Helpful
7
Replies

Webex API Integration Oauth Flow

admartine
Level 1
Level 1

Hello.

I'm developing a Spring Boot micro service to interact with the Webex API, according to the official documentation:

https://developer.webex.com/docs/login-with-webex#openid-connect-scopes-and-claims

Webex Integrations support following oauth flows:

admartine_0-1683280157560.png

In all of the mentioned oauth flows the user is prompted to introduce his/her credentials. Webex API does not support the client_credentials oauth flow:

https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow

for M2M (Machine to Machine communications).

Specifically, I need to call the Webex API to create a new meeting without prompting the user to introduce his/her credentials every time. I need to do this operation in an unattended manner.

I have tried to do this operation with a Webex Bot with no success.

Is there any option to make calls to Webex API without prompting the user to introduce his/her credentials every time?

Is there any way to configure the authentication process so the user has to introduce his/her credentials only once and not every time (no caching)?

Thank you for your help.

 

 

 

1 Accepted Solution

Hello.

That has solved my problem. Thank you very much!

I was trying to create a meeting without the hostEmail parameter.

Though, in the official API documentation: https://developer.webex.com/docs/api/v1/meetings/create-a-meeting

the hostEmail parameter is not required.

Thank you for your help.

 

View solution in original post

7 Replies 7

dtibbe
VIP Alumni
VIP Alumni

No, not for integrations.

You may have a look at Service Applications: https://developer.webex.com/docs/service-app

Hello.

Thank you for your response.

Is there any specific code example (in Java or Python) that shows how to generate an access token via service app and create a meeting via API?

Thank you for your help.

Service Apps including the retrieval of the first access token is described in the documentation: https://developer.webex.com/docs/service-app

After that, you may use the refresh token to renew the access token (as you would also do for integrations as dstaudt mentioned).

The creation of a meeting is described at https://developer.webex.com/docs/api/v1/meetings/create-a-meeting and some general notes are given at the overview page: https://developer.webex.com/docs/meetings

Adapting the HTTP requests to the code language of your choice should be easy

Hello.

I have read the service app documentation: https://developer.webex.com/docs/service-app

I have generated an access token with the spark:all permission and all permissions related to meeting, but when I try to create a meeting via Postman using the access token, I always get an "500 Internal Server Error"

I have authorized the service app.

Thank you for your help.

 

 

Can you share the tracking ID from that screenshot in text format? Can you also provide the full API request that was made? (our logs don't store that for privacy reasons).

Might be best to create a ticket at devsupport@webex.com with all this info, so that we can investigate properly.

But I think that the 500 error may occur when trying to create a meeting without giving the hostEmail parameter, you could test with it and see if it helps. If not, then please create the ticket with above mentioned information. 

Hello.

That has solved my problem. Thank you very much!

I was trying to create a meeting without the hostEmail parameter.

Though, in the official API documentation: https://developer.webex.com/docs/api/v1/meetings/create-a-meeting

the hostEmail parameter is not required.

Thank you for your help.

 

In general, the trick is to obtain an access token and refresh token for an admin account (either via a manual Integration OAuth2 flow or generated via Service App), and then keep the fresh token alive indefinitely for use by your app.
This article covers doing so using a HashiCorp Vault plugin: https://blogs.cisco.com/developer/webexapioauthtokenhashicopvault01
though you can easily do so in your app - as long as it is running continuously (or at minimum once every < 90 days).