<?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 SDK: token API intermittently returns 400 Bad Request in APIs</title>
    <link>https://community.cisco.com/t5/apis/sdk-token-api-intermittently-returns-400-bad-request/m-p/4876214#M40</link>
    <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;I’m using the DuoUniversal C# SDK.  Everything works fine most of the time.  But intermittently, the call to Client.ExchangeAuthorizationCodeFor2faResult() throws an error because the call to the /oauth/v1/token API has returned a 400 Bad Request response code.  My computer clock is accurate.  What might cause it to intermittently fail like this?&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 13 Apr 2022 17:28:29 GMT</pubDate>
    <dc:creator>AndyL1</dc:creator>
    <dc:date>2022-04-13T17:28:29Z</dc:date>
    <item>
      <title>SDK: token API intermittently returns 400 Bad Request</title>
      <link>https://community.cisco.com/t5/apis/sdk-token-api-intermittently-returns-400-bad-request/m-p/4876214#M40</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;I’m using the DuoUniversal C# SDK.  Everything works fine most of the time.  But intermittently, the call to Client.ExchangeAuthorizationCodeFor2faResult() throws an error because the call to the /oauth/v1/token API has returned a 400 Bad Request response code.  My computer clock is accurate.  What might cause it to intermittently fail like this?&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 13 Apr 2022 17:28:29 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/sdk-token-api-intermittently-returns-400-bad-request/m-p/4876214#M40</guid>
      <dc:creator>AndyL1</dc:creator>
      <dc:date>2022-04-13T17:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: SDK: token API intermittently returns 400 Bad Request</title>
      <link>https://community.cisco.com/t5/apis/sdk-token-api-intermittently-returns-400-bad-request/m-p/4876215#M41</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Some more info.  I ran the client library in source (from Github) and found the HTTP 400 error response from the API has the following body:&lt;/P&gt;
&lt;P&gt;{“error”: “invalid_client”, “error_description”: “Invalid Client assertion: Token used before nbf.”}&lt;/P&gt;
&lt;P&gt;But as I said, my computer clock on my web server is accurate.&lt;/P&gt;
&lt;P&gt;It looks like the client library generates a JWT to pass to the API with a nbf field set to exactly the current time on the web server.  Which would mean that if the web server’s time is even a second ahead of the Duo API server’s time, the Duo API would reject the call… that can’t be right, can it?&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 14 Apr 2022 15:59:13 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/sdk-token-api-intermittently-returns-400-bad-request/m-p/4876215#M41</guid>
      <dc:creator>AndyL1</dc:creator>
      <dc:date>2022-04-14T15:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: SDK: token API intermittently returns 400 Bad Request</title>
      <link>https://community.cisco.com/t5/apis/sdk-token-api-intermittently-returns-400-bad-request/m-p/4876216#M42</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Update: was a bug in the C# client library.  Apparently there will be a fixed version 1.1.1 available shortly!&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 19 Apr 2022 16:16:09 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/sdk-token-api-intermittently-returns-400-bad-request/m-p/4876216#M42</guid>
      <dc:creator>AndyL1</dc:creator>
      <dc:date>2022-04-19T16:16:09Z</dc:date>
    </item>
  </channel>
</rss>

