{"action":"created","issue":{"url":"https://api.github.com/repos/authy/authy-java/issues/30","repository_url":"https://api.github.com/repos/authy/authy-java","labels_url":"https://api.github.com/repos/authy/authy-java/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/authy/authy-java/issues/30/comments","events_url":"https://api.github.com/repos/authy/authy-java/issues/30/events","html_url":"https://github.com/authy/authy-java/issues/30","id":230177321,"number":30,"title":"NullPointerException in version 1.2.0 (com.authy.api.Resource.java)","user":{"login":"tpthaler","id":28830772,"avatar_url":"https://avatars2.githubusercontent.com/u/28830772?v=3","gravatar_id":"","url":"https://api.github.com/users/tpthaler","html_url":"https://github.com/tpthaler","followers_url":"https://api.github.com/users/tpthaler/followers","following_url":"https://api.github.com/users/tpthaler/following{/other_user}","gists_url":"https://api.github.com/users/tpthaler/gists{/gist_id}","starred_url":"https://api.github.com/users/tpthaler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpthaler/subscriptions","organizations_url":"https://api.github.com/users/tpthaler/orgs","repos_url":"https://api.github.com/users/tpthaler/repos","events_url":"https://api.github.com/users/tpthaler/events{/privacy}","received_events_url":"https://api.github.com/users/tpthaler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-05-20T20:31:30Z","updated_at":"2017-05-23T16:54:20Z","closed_at":null,"body":"`\r\n     StringBuilder e = new StringBuilder();\r\n            if(method.equals(\"GET\")) {\r\n                e.append(this.prepareGet(data));\r\n            }\r\n\r\n            URL url = new URL(this.apiUri + path + e.toString());\r\n            HttpURLConnection connection = this.createConnection(url, method, options);\r\n            connection.setRequestProperty(\"X-Authy-API-Key\", this.apiKey);\r\n            if(data.toMap().containsKey(\"api_key\")) {//THROWS A NULL POINTER EXCEPTION\r\n                LOGGER.log(Level.WARNING, \"Found \\'api_key\\' as a parameter, please remove it, Authy-Java already handles the\\'api_key\\' for you.\");\r\n            }\r\n\r\n            if(method.equals(\"POST\") || method.equals(\"PUT\")) {\r\n                if(this.isJSON) {\r\n                    this.writeJson(connection, data);\r\n                } else {\r\n                    this.writeXml(connection, data);\r\n                }\r\n            }\r\n\r\n            this.status = connection.getResponseCode();\r\n            answer = this.getResponse(connection);\r\n        } catch (SSLHandshakeException var9) {\r\n            System.err.println(\"SSL verification is failing. This might be because of an attack. Contact support@authy.com\");\r\n        } catch (Exception var10) {\r\n            var10.printStackTrace();\r\n        }\r\n\r\n        return answer;\r\n    }\r\n`\r\n\r\nThis line of code is throwing a NPE when trying to create a user, using your documented process (the createUser line below works fine in version 1.1.0):\r\n\r\n`\r\nUser user = users.createUser(\"new_user@email.com\", \"405-342-5699\", \"57\");\r\n\r\n//eventually calls this which is what blows up as data = null\r\n if(data.toMap().containsKey(\"api_key\")) {\r\n`\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/authy/authy-java/issues/comments/303464815","html_url":"https://github.com/authy/authy-java/issues/30#issuecomment-303464815","issue_url":"https://api.github.com/repos/authy/authy-java/issues/30","id":303464815,"user":{"login":"vargasx","id":15661037,"avatar_url":"https://avatars3.githubusercontent.com/u/15661037?v=3","gravatar_id":"","url":"https://api.github.com/users/vargasx","html_url":"https://github.com/vargasx","followers_url":"https://api.github.com/users/vargasx/followers","following_url":"https://api.github.com/users/vargasx/following{/other_user}","gists_url":"https://api.github.com/users/vargasx/gists{/gist_id}","starred_url":"https://api.github.com/users/vargasx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vargasx/subscriptions","organizations_url":"https://api.github.com/users/vargasx/orgs","repos_url":"https://api.github.com/users/vargasx/repos","events_url":"https://api.github.com/users/vargasx/events{/privacy}","received_events_url":"https://api.github.com/users/vargasx/received_events","type":"User","site_admin":false},"created_at":"2017-05-23T16:54:20Z","updated_at":"2017-05-23T16:54:20Z","body":"@tpthaler looks like it is working now"}}
{"actor":{"display_login":"vargasx"}}