             if (voteTokenBool && hostBool){
                 host = json["host"].string!
                 voteToken = json["voteToken"].string!
+                deviceID = UIDevice.currentDevice().identifierForVendor!.UUIDString
                 AudioServicesPlayAlertSound(kSystemSoundID_Vibrate)
-                sendRequest(host, voteToken: voteToken)
+                sendRequest(host, voteToken: voteToken, deviceID: deviceID)
                 messageLabel.textColor = UIColor.clearColor()
                 qrCodeFrameView?.frame = CGRectZero
                 captureSession?.stopRunning()

                    if(response.response?.statusCode >= 400) {
                        let alertView = UIAlertController(title: "Falscher QR Code", message: "Bitte überprüfen, ob der QR Code nicht bereits genutzt wurde.", preferredStyle: .Alert)
                        alertView.addAction(UIAlertAction(title: "Ok", style: .Default, handler: {_ in
                        self.captureSession?.startRunning()
                        self.messageLabel.textColor = UIColor.whiteColor()
                        self.messageLabel.text = "Bitte QR-Code scannen"
                        }))
                        self.presentViewController(alertView, animated: true, completion: nil)
                        // handle 409 specific error here, if you want
                        //print("Request failed with error: \(error)")
                        //print("Test")
                        } else if(response.result.error?.code == -1004) {
                            let alertView = UIAlertController(title: "Fehler", message: "Server ist zurzeit nicht erreichbar.", preferredStyle: .Alert)
                        alertView.addAction(UIAlertAction(title: "Ok", style: .Default, handler: {_ in
                        self.captureSession?.startRunning()
                        self.messageLabel.textColor = UIColor.whiteColor()
                        self.messageLabel.text = "Bitte QR-Code scannen"}))
                            self.presentViewController(alertView, animated: true, completion: nil)
                    }
            
                case .Success:
                    //print(responseObject)
                    if let value = response.result.value{

        cameraAllowsAccessToApplicationCheck()
    }
    
    func sendRequest(host:String, voteToken:String, deviceID:String) {
        let request = NSMutableURLRequest(URL: NSURL(string: host + "/v1/questions")!)
        request.HTTPMethod = "POST"
        request.setValue("application/json", forHTTPHeaderField: "Content-Type")
        
        let jsonBody = ["voteToken": voteToken, "host": host, "deviceID": deviceID]
        
        print(jsonBody)
        
