<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: WebEx OAuth in c# in Webex for Developers</title>
    <link>https://community.cisco.com/t5/webex-for-developers/webex-oauth-in-c/m-p/4982094#M2706</link>
    <description>&lt;P&gt;The Webex Rest API does not support basic auth for OAuth, ie. you must use the web form for authorization.&lt;/P&gt;
&lt;P&gt;To access the recording endpoint, you'd need to be authenticated - a JWT will not work for that.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Dec 2023 08:42:19 GMT</pubDate>
    <dc:creator>dtibbe</dc:creator>
    <dc:date>2023-12-20T08:42:19Z</dc:date>
    <item>
      <title>WebEx OAuth in c#</title>
      <link>https://community.cisco.com/t5/webex-for-developers/webex-oauth-in-c/m-p/4982060#M2703</link>
      <description>&lt;P&gt;Are there any sample codes in c# that demonstrate an OAuth with WebEx and retrieve a token ?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 07:38:59 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/webex-oauth-in-c/m-p/4982060#M2703</guid>
      <dc:creator>cgr-921</dc:creator>
      <dc:date>2023-12-20T07:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: WebEx OAuth in c#</title>
      <link>https://community.cisco.com/t5/webex-for-developers/webex-oauth-in-c/m-p/4982075#M2704</link>
      <description>&lt;P&gt;I did that some time ago.. My GUI app had a browser control. When trying to authorize, I ran the known flow. The redirect URL was basically a non-existing localhost-URL. That raised a HTTP/404 for sure. That one was catched by my app, extracted the URL and grabbed the token to use it in the final step. Worked fine.&lt;BR /&gt;The app itself used Darren's Webex Rest API wrapper Spark.Net: &lt;A href="https://github.com/darrenparkinson/SparkDotNet" target="_blank"&gt;https://github.com/darrenparkinson/SparkDotNet&lt;/A&gt; (bit outdated, but the wrapper can be extended quite easily)&lt;/P&gt;
&lt;P&gt;If you're planning to build a command line app, you may want to have a look at Service Apps as well: &lt;A href="https://developer.webex.com/docs/service-apps" target="_blank"&gt;https://developer.webex.com/docs/service-apps&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 08:07:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/webex-oauth-in-c/m-p/4982075#M2704</guid>
      <dc:creator>dtibbe</dc:creator>
      <dc:date>2023-12-20T08:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: WebEx OAuth in c#</title>
      <link>https://community.cisco.com/t5/webex-for-developers/webex-oauth-in-c/m-p/4982081#M2705</link>
      <description>&lt;P&gt;Thanks for the response. Before I look into the wrapper, I was wondering if there's a simple way to just encode the client credentials (with clientid, clientsecret) and send a token request,&lt;/P&gt;&lt;P&gt;Similar to this:&lt;/P&gt;&lt;P&gt;HttpClient client = new HttpClient();&lt;/P&gt;&lt;P&gt;// Encode client credentials&lt;BR /&gt;string credentials = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes($"{clientId}:{clientSecret}"));&lt;/P&gt;&lt;P&gt;// Prepare the request to get the access token&lt;BR /&gt;var tokenRequest = new HttpRequestMessage(HttpMethod.Post, tokenEndpoint);&lt;BR /&gt;tokenRequest.Headers.Add("Authorization", $"Basic {credentials}");&lt;BR /&gt;tokenRequest.Content = new FormUrlEncodedContent(new[]&lt;BR /&gt;{&lt;BR /&gt;new KeyValuePair&amp;lt;string, string&amp;gt;("grant_type", "client_credentials"),&lt;BR /&gt;new KeyValuePair&amp;lt;string, string&amp;gt;("scope", scope)&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;// Send the token request&lt;BR /&gt;HttpResponseMessage tokenResponse = await client.SendAsync(tokenRequest);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, my goal is to access recordings and download them. Would I still need OAuth or can it be done with a guest JWT ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 08:30:52 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/webex-oauth-in-c/m-p/4982081#M2705</guid>
      <dc:creator>cgr-921</dc:creator>
      <dc:date>2023-12-20T08:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: WebEx OAuth in c#</title>
      <link>https://community.cisco.com/t5/webex-for-developers/webex-oauth-in-c/m-p/4982094#M2706</link>
      <description>&lt;P&gt;The Webex Rest API does not support basic auth for OAuth, ie. you must use the web form for authorization.&lt;/P&gt;
&lt;P&gt;To access the recording endpoint, you'd need to be authenticated - a JWT will not work for that.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 08:42:19 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/webex-oauth-in-c/m-p/4982094#M2706</guid>
      <dc:creator>dtibbe</dc:creator>
      <dc:date>2023-12-20T08:42:19Z</dc:date>
    </item>
  </channel>
</rss>

