<?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: iOS: Detect when DBError is &amp;quot;Invalid Access Token&amp;quot;  in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/iOS-Detect-when-DBError-is-quot-Invalid-Access-Token-quot/m-p/167580#M6088</link>
    <description>&lt;P&gt;Hi Robert, it sounds like you're looking for the&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBRequestAuthError.html#/c:objc(cs)DBRequestAuthError(py)structuredAuthError" target="_blank" rel="nofollow noreferrer"&gt;structuredAuthError property on&amp;nbsp;DBRequestAuthError&lt;/A&gt;. That will give you the&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBAUTHAuthError.html" target="_blank" rel="nofollow noreferrer"&gt;DBAUTHAuthError&lt;/A&gt;, on which you can call&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBAUTHAuthError.html#/c:objc(cs)DBAUTHAuthError(im)isInvalidAccessToken" target="_blank" rel="nofollow noreferrer"&gt;isInvalidAccessToken&lt;/A&gt; etc. E.g.:&lt;/P&gt;
&lt;PRE&gt; if (authError.structuredAuthError.isInvalidAccessToken) {&lt;BR /&gt; NSLog(@"Invalid acess token.");&lt;BR /&gt; }&lt;/PRE&gt;
&lt;P&gt;Hope this helps!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Sep 2016 04:17:34 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2016-09-23T04:17:34Z</dc:date>
    <item>
      <title>iOS: Detect when DBError is "Invalid Access Token"</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/iOS-Detect-when-DBError-is-quot-Invalid-Access-Token-quot/m-p/167579#M6087</link>
      <description>&lt;P&gt;I need to determine when a DBError instance returned from listFolder: or downloadData: is because of an Invalid Access Token. &amp;nbsp;So far I can see how to transform the DBError into a DBRequestAuthError using:&lt;/P&gt;
&lt;P&gt;[error asAuthError]&lt;/P&gt;
&lt;P&gt;provided [error isAuthError]. &amp;nbsp;And I can see how to check for Invalid Access Token in an instance of DBAuthError using [... isInvalidAccessToken]. &amp;nbsp;But I don't know how to get from a DBRequestAuthError to a DBAuthError. &amp;nbsp;isInvalidAccessToken: does not apply to class DBRequestAuthError.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:29:51 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/iOS-Detect-when-DBError-is-quot-Invalid-Access-Token-quot/m-p/167579#M6087</guid>
      <dc:creator>Robert S.138</dc:creator>
      <dc:date>2019-05-29T09:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: iOS: Detect when DBError is "Invalid Access Token"</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/iOS-Detect-when-DBError-is-quot-Invalid-Access-Token-quot/m-p/167580#M6088</link>
      <description>&lt;P&gt;Hi Robert, it sounds like you're looking for the&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBRequestAuthError.html#/c:objc(cs)DBRequestAuthError(py)structuredAuthError" target="_blank" rel="nofollow noreferrer"&gt;structuredAuthError property on&amp;nbsp;DBRequestAuthError&lt;/A&gt;. That will give you the&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBAUTHAuthError.html" target="_blank" rel="nofollow noreferrer"&gt;DBAUTHAuthError&lt;/A&gt;, on which you can call&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBAUTHAuthError.html#/c:objc(cs)DBAUTHAuthError(im)isInvalidAccessToken" target="_blank" rel="nofollow noreferrer"&gt;isInvalidAccessToken&lt;/A&gt; etc. E.g.:&lt;/P&gt;
&lt;PRE&gt; if (authError.structuredAuthError.isInvalidAccessToken) {&lt;BR /&gt; NSLog(@"Invalid acess token.");&lt;BR /&gt; }&lt;/PRE&gt;
&lt;P&gt;Hope this helps!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 04:17:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/iOS-Detect-when-DBError-is-quot-Invalid-Access-Token-quot/m-p/167580#M6088</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-09-23T04:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: iOS: Detect when DBError is "Invalid Access Token"</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/iOS-Detect-when-DBError-is-quot-Invalid-Access-Token-quot/m-p/167581#M6089</link>
      <description>&lt;P&gt;Yes, that compiles without errors. &amp;nbsp;I am doing this:&lt;/P&gt;
&lt;PRE&gt;if( [dbError isAuthError]&amp;nbsp; )&amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; DBRequestAuthError* dbAuthError = [dbError asAuthError];&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if (dbAuthError.structuredAuthError.isInvalidAccessToken) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //..handle Invalid Access Token Error&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;}&lt;/PRE&gt;
&lt;P&gt;where dbError is the instance of DBError returned by the API. But I am also curious about the need for the method "asAuthError". &amp;nbsp;Could I not just as well do this:&lt;/P&gt;
&lt;PRE&gt;if( [dbError isAuthError]&amp;nbsp; )&amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if (dbError.structuredAuthError.isInvalidAccessToken) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //..handle Invalid Access Token Error&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;}&lt;/PRE&gt;
&lt;P&gt;This also compiles without any errors or warnings. &amp;nbsp;Will it work?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 07:29:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/iOS-Detect-when-DBError-is-quot-Invalid-Access-Token-quot/m-p/167581#M6089</guid>
      <dc:creator>Robert S.138</dc:creator>
      <dc:date>2016-09-23T07:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: iOS: Detect when DBError is "Invalid Access Token"</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/iOS-Detect-when-DBError-is-quot-Invalid-Access-Token-quot/m-p/167582#M6090</link>
      <description>&lt;P&gt;I believe either way is safe as long as you have that&amp;nbsp;isAuthError check. The&amp;nbsp;asAuthError call just gives you the object as&amp;nbsp;DBRequestAuthError instead of&amp;nbsp;DBRequestHttpError, but it doesn't seem to make a difference in this case.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Sep 2016 00:46:42 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/iOS-Detect-when-DBError-is-quot-Invalid-Access-Token-quot/m-p/167582#M6090</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-09-24T00:46:42Z</dc:date>
    </item>
  </channel>
</rss>

