                 assert(false, "NO oauthtoken present in app. Log out!")
             }
             // has found higher level oAuthToken that is outdated, try refreshing a lower level token
-
-
         }
     }
 

    func send(htmlContent: String, recipients: [Recipient], uri: String, success: (() -> Void) , failure: (error: APIError) -> ()) {
        let url = NSURL(string: uri)
        let oauthToken = OAuthToken.oAuthTokenWithScope(kOauth2ScopeFull)
        let parameters = ["subject" : "klasrdd", "deliveryMethod" : "DIGIPOST", "authenticationLevel" : "PASSWORD"]
        validate(token: oauthToken) { () -> Void in
            let task = self.urlSessionJSONTask(httpMethod.post, url: uri, parameters: parameters, success: { (responseJSON) -> Void in
                println(responseJSON)
                let sendableDocument = SendableDocument(dictionary: responseJSON)
                sendableDocument.recipients = recipients
                let fileURL = sendableDocument.urlForHTMLContentOnDisk(htmlContent)
                self.uploadFile(sendableDocument.addContentUri!, fileURL: fileURL!, success: { () -> Void in
                    println(success)

            dispatch_async(dispatch_get_main_queue(), {
                self.removeTemporaryUploadFiles()
                self.isUploadingFile = false
                println(response as! NSHTTPURLResponse)
                println(anyObject)
                let s = NSString(data: anyObject as! NSData, encoding: NSASCIIStringEncoding)
                println(s)

                if self.isUnauthorized(response as! NSHTTPURLResponse?) {
                    self.removeAccessTokenUsedInLastRequest()
//                    self.uploadFile(url: url, folder: folder, success: success, failure: failure)
