<?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 How to access the missing_scope Error Messages that gets returned in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-the-missing-scope-Error-Messages-that-gets/m-p/507681#M25082</link>
    <description>&lt;P&gt;There are 2 issues I would like to get some clarity on.&lt;/P&gt;&lt;P&gt;Environment: Xcode 12 / IOS 14.4 / SwiftyDropbox&lt;/P&gt;&lt;P&gt;I want to download a file from a shared scoped dropbox Folder. Previously I did not enable the files.content.read scope and thus I am getting the below error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Printing description of error:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;▿ [request-id 672ec403478646ebbc3bb15bea5a631f] API auth error - {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;".tag" = "missing_scope";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;"required_scope" = "files.content.read";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This error comes via a simple print(error)&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;   _ = client.files.download(path: dbFile.pathLower!, destination: destination)
                    .response { response, error in
                      if let (_, url) = response {
                        /// Downloaded a copy of Remote file. Append into LocalFile list
                        print("DOWNLOADED       DropBox File:\(url.lastPathComponent)")
                        localFileList.append(dbFileNameRev)
                      } else if let callError = error {
                        print("\n\n::::::\n\(#function):: ERROR downloading file from Dropbox: \(error)")
                      }
                    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem #1:&lt;/P&gt;&lt;P&gt;I would like to be able to get to the "missing_scope" error message and despite trying out the few examples I found on SO and in SwiftyDropbox documentation, I'm still unclear on how to get access the the nested cases/switch statement. (the swiftydropbox documentation provides example of /delete) and this&amp;nbsp;&lt;A href="https://riptutorial.com/dropbox-api/example/1351/downloading-a-file-with-every-error-case-handled-using-the-swiftydropbox-library" target="_blank" rel="noopener"&gt;https://riptutorial.com/dropbox-api/example/1351/downloading-a-file-with-every-error-case-handled-using-the-swiftydropbox-library&lt;/A&gt;&amp;nbsp;wasn't quite helpful&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried playing around and doing some trial and error to no avail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem #2&lt;/P&gt;&lt;P&gt;I have no enabled the file.content.read scoped access in app console as well as within the code during the authorisation request, but this would only take into effect for NEW authorisations and not existing ones. (hence the error shown above). The documentation says to re-authorise the user again. However, I'm having issue whereby the authorisation call needs a ViewController reference. Is there method I can call the authorisation from a function instead?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Mar 2021 05:24:05 GMT</pubDate>
    <dc:creator>App4G</dc:creator>
    <dc:date>2021-03-25T05:24:05Z</dc:date>
    <item>
      <title>How to access the missing_scope Error Messages that gets returned</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-the-missing-scope-Error-Messages-that-gets/m-p/507681#M25082</link>
      <description>&lt;P&gt;There are 2 issues I would like to get some clarity on.&lt;/P&gt;&lt;P&gt;Environment: Xcode 12 / IOS 14.4 / SwiftyDropbox&lt;/P&gt;&lt;P&gt;I want to download a file from a shared scoped dropbox Folder. Previously I did not enable the files.content.read scope and thus I am getting the below error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Printing description of error:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;▿ [request-id 672ec403478646ebbc3bb15bea5a631f] API auth error - {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;".tag" = "missing_scope";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;"required_scope" = "files.content.read";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This error comes via a simple print(error)&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;   _ = client.files.download(path: dbFile.pathLower!, destination: destination)
                    .response { response, error in
                      if let (_, url) = response {
                        /// Downloaded a copy of Remote file. Append into LocalFile list
                        print("DOWNLOADED       DropBox File:\(url.lastPathComponent)")
                        localFileList.append(dbFileNameRev)
                      } else if let callError = error {
                        print("\n\n::::::\n\(#function):: ERROR downloading file from Dropbox: \(error)")
                      }
                    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem #1:&lt;/P&gt;&lt;P&gt;I would like to be able to get to the "missing_scope" error message and despite trying out the few examples I found on SO and in SwiftyDropbox documentation, I'm still unclear on how to get access the the nested cases/switch statement. (the swiftydropbox documentation provides example of /delete) and this&amp;nbsp;&lt;A href="https://riptutorial.com/dropbox-api/example/1351/downloading-a-file-with-every-error-case-handled-using-the-swiftydropbox-library" target="_blank" rel="noopener"&gt;https://riptutorial.com/dropbox-api/example/1351/downloading-a-file-with-every-error-case-handled-using-the-swiftydropbox-library&lt;/A&gt;&amp;nbsp;wasn't quite helpful&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried playing around and doing some trial and error to no avail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem #2&lt;/P&gt;&lt;P&gt;I have no enabled the file.content.read scoped access in app console as well as within the code during the authorisation request, but this would only take into effect for NEW authorisations and not existing ones. (hence the error shown above). The documentation says to re-authorise the user again. However, I'm having issue whereby the authorisation call needs a ViewController reference. Is there method I can call the authorisation from a function instead?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 05:24:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-the-missing-scope-Error-Messages-that-gets/m-p/507681#M25082</guid>
      <dc:creator>App4G</dc:creator>
      <dc:date>2021-03-25T05:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to access the missing_scope Error Messages that gets returned</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-the-missing-scope-Error-Messages-that-gets/m-p/507880#M25087</link>
      <description>&lt;P&gt;1: Here's an example of how you can drill down into this kind of error:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;switch callError as CallError {
case .authError(let authError, let userMessage, let errorSummary, let requestId):
    switch authError {
    case .missingScope(let tokenScopeError):
        print("Missing scope error: \(tokenScopeError)")
        print("The required scope is: \(tokenScopeError.requiredScope)")
    default:
        print("other AuthError omitted for brevity of example")
    }
default:
    print("other CallError omitted for brevity of example")
}&lt;/LI-CODE&gt;
&lt;P&gt;2: No, there's just &lt;A href="https://github.com/dropbox/SwiftyDropbox#handling-the-authorization-flow" target="_self"&gt;the authorization flow as documented here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 16:58:43 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-the-missing-scope-Error-Messages-that-gets/m-p/507880#M25087</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-03-25T16:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to access the missing_scope Error Messages that gets returned</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-the-missing-scope-Error-Messages-that-gets/m-p/508883#M25122</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;&amp;nbsp;Thanks very much. with item #1 guidance provided by you, I can then enable an alert to be shown to the user and ask them to re-authenticate again using the existing Auth flow.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 07:09:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-the-missing-scope-Error-Messages-that-gets/m-p/508883#M25122</guid>
      <dc:creator>App4G</dc:creator>
      <dc:date>2021-03-30T07:09:05Z</dc:date>
    </item>
  </channel>
</rss>

