SwiftyDropbox for iOSを参考にしてAPIを導入しました。
そして、DoropBox内の「セキュリティ」→「リンク済みのアプリ」で自分で追加したアプリを削除したところ以下のエラーが発生しました。
[request-id xxxxxxxxxxxxxxxxx] HTTP Error401: An error occurred.
このエラーについて調べたところ、
Standard API errorsに
401
Bad or expired token. This can happen if the user or Dropbox revoked or expired an access token. To fix, you should re-authenticate the user.
と書いてあり再認証をする必要があることがわかりました。
関係ありそうな箇所:
Swift
1AppDelegate 2func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool { 3 4 if let authResult = Dropbox.handleRedirectURL(url) { 5 switch authResult { 6 case .Success(let token): 7 print("Success! User is logged into Dropbox with token: \(token)") 8 case .Error(let error, let description): 9 print("Error \(error): \(description)") 10 } 11 } 12 return false 13 }
この「再認証」はどうやるのでしょうか?
教えてください、よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。