         router.get("api/v1/pocket/authorized/:slack_id") { request, response, next in
             Log.debug("api/v1/pocket/auth/:slack_id")
             
-            if let slackId = request.params["slack_id"] {
+            if let slackId = request.params["slack_id"],
+            let pocketRequestToken = self.pocketRequestTokens[slackId] {
                 Log.debug("finishing authorization for slackId =  \(slackId)")
                 
                 let authStep2 = SimpleHttpClient.HttpResourse(schema: "https", host: "getpocket.com/v3/oauth/authorize", port: "80")
                 let headers = ["Content-Type": "application/x-www-form-urlencoded; charset=UTF8",
                                "X-Accept": "(x-www-form-urlencoded"];
-                let postString = "consumer_key=\(self.pocketConsumerKey)&code=\(self.pocketRequestToken)"
+                let postString = "consumer_key=\(self.pocketConsumerKey)&code=\(pocketRequestToken)"
                 
                 if let data = postString.data(using: NSUTF8StringEncoding) {
                     

                Log.debug("Request from slack user = \(command.userId)")
                Log.debug("To send link = \(command.text)")
                
                if let pocketAccessToken = self.pocketAccessToken {
                    
                    let addLink = SimpleHttpClient.HttpResourse(schema: "https", host: "getpocket.com/v3/add", port: "80")
                    let headers = ["Content-Type": "application/json; charset=UTF8",

        }
    }
    
    private var slackUserIds: [String] = []
    private var pocketAccessTokens: [String: String] = [:]
    private var pocketRequestTokens: [String: String] = [:]
    private var pocketUsernames: [String: String] = [:]
    
    let router: Router
    
    init(using router: Kitura.Router) {
        self.router = router
        self.setupRoutes()
    }
    
    mutating func setupRoutes() {
