cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

138
Views
0
Helpful
1
Replies
Raffaele Lagana
Cisco Employee

How to use webex.authorization.requestAccessTokenFromJwt({jwt})

Hi, I'm new to Webex JS SDK and Javascript, and I want to log the access token to console after getting it by calling webex.authorization.requestAccessTokenFromJwt({jwt}). How does this work?

1 ACCEPTED SOLUTION

Accepted Solutions
Raffaele Lagana
Cisco Employee

That function is simply making a POST request to 

https://webexapis.com/v1/jwt/login with whatever the jwt value is. It would be in an Authorization header as a bearer token.

We have a great sample that uses exactly this method to authenticate the JWT, you can check it out here: https://webexsamples.github.io/browser-sdk-samples/browser-auth-jwt/ . Code for that sample is found here: https://github.com/WebexSamples/browser-sdk-samples/tree/main/browser-auth-jwt (the app.js file contains this function)

View solution in original post

1 REPLY 1
Raffaele Lagana
Cisco Employee

That function is simply making a POST request to 

https://webexapis.com/v1/jwt/login with whatever the jwt value is. It would be in an Authorization header as a bearer token.

We have a great sample that uses exactly this method to authenticate the JWT, you can check it out here: https://webexsamples.github.io/browser-sdk-samples/browser-auth-jwt/ . Code for that sample is found here: https://github.com/WebexSamples/browser-sdk-samples/tree/main/browser-auth-jwt (the app.js file contains this function)
Create
Recognize Your Peers
Content for Community-Ad