{"__v":37,"_id":"56040301e416560d00fa63eb","category":{"__v":15,"_id":"560262e74f15002100ee4445","pages":["560265953ee4af170004710e","56026815930fe1170074bd5c","56026980930fe1170074bd5f","56026a074f15002100ee444f","56026a794f15002100ee4452","5603e9cd8d58900d0051ea59","56040301e416560d00fa63eb","5604f5ebe266000d00897195","560512f1e266000d008971b6","560515a7e266000d008971ba","56051aafe266000d008971be","56051fcbd5c3900d0003e82c","560521cef6b86e0d00284ab7","560526a1f6b86e0d00284abd","56052d2ef6b86e0d00284ac5"],"project":"55edea207145f717001ac12c","version":"55edea207145f717001ac12f","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-23T08:29:27.425Z","from_sync":false,"order":9999,"slug":"api","title":"API"},"project":"55edea207145f717001ac12c","user":"55ede9ed1452cd0d009e5e6b","version":{"__v":11,"_id":"55edea207145f717001ac12f","project":"55edea207145f717001ac12c","createdAt":"2015-09-07T19:48:48.670Z","releaseDate":"2015-09-07T19:48:48.670Z","categories":["55edea217145f717001ac130","55ffa8038c0c9d0d00dcac72","55ffbaa48c0c9d0d00dcac88","55ffbd3e8c0c9d0d00dcac8b","55ffbee40e2b090d00863393","55ffc4306932a00d00ba7a85","55ffc66bfeaf310d007dd6c8","55ffc9c2feaf310d007dd6d1","55ffceca0e2b090d008633b2","560111b06811d00d00ceb34e","560262e74f15002100ee4445"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-24T14:04:49.620Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":7,"body":"##Description\nMethod begins Rublon 2FA authentication.\n\n##URL\n<pre>https://code.rublon.com/api/v3/beginTransaction</pre>\n\n##HTTP Headers\nValid HTTP Headers are described [here](doc:api-http-headers).\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Note: `X-Rublon-Signature` header should be a keyed hash value using the HMAC method. (Alghoritm is SHA-256, key is your Rublon Secret Key and data is json created from parameters described below.)\"\n}\n[/block]\n##Request parameters\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Param\",\n    \"h-1\": \"Required?\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"systemToken\",\n    \"1-0\": \"userId\",\n    \"2-0\": \"userEmailHash\",\n    \"3-0\": \"userEmail\",\n    \"4-0\": \"callbackUrl\",\n    \"0-1\": \"`Required`\",\n    \"1-1\": \"`Required`\",\n    \"2-1\": \"`Required`\",\n    \"3-1\": \"`Required`\",\n    \"4-1\": \"`Required`\",\n    \"0-2\": \"The integrated system's unique Id provided by Rublon service in project registration.\",\n    \"4-2\": \"The integrated system's callback URL\",\n    \"1-2\": \"The integrated system's user's unique Id which will allow to log in the user upon successful authentication\",\n    \"3-2\": \"The user's email address in the integrated system which will allow to check the user's protection status and match the user to a Rublon account\",\n    \"2-2\": \"SHA256 hash generated from lowercased user email.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n##Responses\n\nThis API call should return standard response for successful HTTP requests (status code 200). \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"request\",\n    \"h-1\": \"response\",\n    \"0-0\": \"valid\",\n    \"0-1\": \"JSON with `status`='OK' and unique `webURI` (browser should be redirected to this address for Trusted Device verification).\",\n    \"1-0\": \"invalid\",\n    \"1-1\": \"JSON with `status`='ERROR' and appropriate `errorMessage`.\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\n### Response format\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"status\\\": \\\"OK\\\",\\n    \\\"result\\\": {\\n        \\\"webURI\\\": \\\"https://code.rublon.com/api/v3/web/9UHbkVQfhz0pZb0wnxTCw7ZgtsWKZTum0sgPe3MIeaWMUK9Ec96kXKOH5NWg4LhqfIPjeo9mK6jOkDDDats0mSjfOLHgS98343Yp\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK\"\n    },\n    {\n      \"code\": \"{\\n    \\\"status\\\": \\\"ERROR\\\",\\n    \\\"result\\\": {\\n        \\\"errorMessage\\\": \\\"Error: ConsumerNotFound_RublonAPIException\\\",\\n        \\\"exception\\\": \\\"ConsumerNotFound_RublonAPIException\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 ConsumerNotFound\"\n    },\n    {\n      \"code\": \"{\\n    \\\"status\\\": \\\"ERROR\\\",\\n    \\\"result\\\": {\\n        \\\"errorMessage\\\": \\\"Error: InvalidSignature_RublonAPIException\\\",\\n        \\\"exception\\\": \\\"InvalidSignature_RublonAPIException\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 InvalidSignature\"\n    }\n  ]\n}\n[/block]\n## Request and response example\n[block:html]\n{\n  \"html\": \"<div class=\\\"try-results\\\"><div class=\\\"try-results-status\\\"><span ng-model=\\\"tryResults.status\\\" class=\\\"httpstatus ng-isolate-scope ng-pristine ng-valid\\\"><span class=\\\"ng-binding httpsuccess\\\" ng-class=\\\"{httpsuccess: status[2], httperror: !status[2]}\\\"><i class=\\\"fa fa-circle\\\"></i> 200 <em class=\\\"ng-binding\\\">OK</em></span></span></div><pre class=\\\"try-results-panel ng-binding\\\">{\\n    \\\"status\\\": \\\"OK\\\",\\n    \\\"result\\\": {\\n        \\\"webURI\\\": \\\"https://code.rublon.com/api/v3/web/DsbAr8AswCwyPL2IQOoHV0mwp9vZ9YqMbQaP7yOgPQlWO0C2xaxNz0QBeUOlwXhix46NRj2gH4LCopCXTiGcgUnIzMqNx6iAZSAQ\\\"\\n    }\\n}</pre><div class=\\\"try-results-panel\\\"><table><tbody><tr><th>Method</th><td class=\\\"ng-binding\\\">POST</td></tr><tr><th>Request Headers</th><td> <pre class=\\\"ng-binding\\\">Accept: application/json, text/javascript, */*; q=0.01\\nExpect: 200-OK\\nX-Rublon-Technology: rublon-php-sdk\\nX-Rublon-API-Version: 3.7.1\\nX-Rublon-API-Version-Date: 2015-07-02\\nX-Rublon-Signature: 59845a7d8dfe0b107e07a95dc6db2bc8850f4f3b51889aedafc9743acfa19570\\naccept-encoding: gzip\\ncontent-type: application/json\\ncontent-length: 234</pre></td></tr><tr><th>URL</th><td class=\\\"ng-binding\\\">https://code.rublon.com/api/v3/beginTransaction</td></tr><tr><th>Request Data</th><td><pre class=\\\"ng-binding\\\">{\\n    \\\"systemToken\\\": \\\"A57C9FD26182435FA08DC909C342C37X\\\",\\n    \\\"userId\\\": \\\"12345\\\",\\n    \\\"userEmailHash\\\": \\\"60a6a37a379dfeed320e8cbd808acbe4e9ab5d264d112f35126d00f50616f64f\\\",\\n    \\\"userEmail\\\": \\\"example:::at:::rublon.com\\\",\\n    \\\"callbackUrl\\\": \\\"http://example.com?rublon=callback\\\"\\n}</pre></td></tr><tr><th>Status</th><td> <span ng-model=\\\"tryResults.status\\\" class=\\\"httpstatus ng-isolate-scope ng-pristine ng-valid\\\"><span class=\\\"ng-binding httpsuccess\\\" ng-class=\\\"{httpsuccess: status[2], httperror: !status[2]}\\\"><i class=\\\"fa fa-circle\\\"></i> 200 <em class=\\\"ng-binding\\\">OK</em></span></span></td></tr><tr><th>Response Headers</th><td><pre class=\\\"ng-binding\\\">server: nginx\\ndate: Fri, 25 Sep 2015 08:08:18 GMT\\ncontent-type: application/json\\ntransfer-encoding: chunked\\nconnection: keep-alive\\nset-cookie: rublon_code_session=a%3A5%3A%7Bs%3A10%3A%22session_id%22%3Bs%3A32%3A%2203c91495160427a0e459d4b01a70dde9%22%3Bs%3A10%3A%22ip_address%22%3Bs%3A12%3A%2254.145.2.221%22%3Bs%3A10%3A%22user_agent%22%3Bb%3A0%3Bs%3A13%3A%22last_activity%22%3Bi%3A1443168497%3Bs%3A9%3A%22user_data%22%3Bs%3A0%3A%22%22%3B%7Dbe75f076b3485eb8cbb977ff5033fe4e; path=/; secure; httponly\\nexpires: Sat, 26 Jul 1997 05:00:00 GMT\\nlast-modified: Fri, 25 Sep 2015 08:08:17 GMT\\ncache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0\\npragma: no-cache\\nx-rublon-signature: 2d89c14dbba68bf92b12b8df075c915a3a95abd9aef3ed953b631dc70ae99c65\\nx-rublon-api-version: 3.7.0\\nx-rublon-api-version-date: 2014-05-20\\nstrict-transport-security: max-age=2592000</pre></td></tr></tbody></table></div></div>\\n\\n<style></style>\"\n}\n[/block]","excerpt":"","slug":"api-begin-transaction","type":"post","title":"beginTransaction"}

postbeginTransaction


##Description Method begins Rublon 2FA authentication. ##URL <pre>https://code.rublon.com/api/v3/beginTransaction</pre> ##HTTP Headers Valid HTTP Headers are described [here](doc:api-http-headers). [block:callout] { "type": "info", "body": "Note: `X-Rublon-Signature` header should be a keyed hash value using the HMAC method. (Alghoritm is SHA-256, key is your Rublon Secret Key and data is json created from parameters described below.)" } [/block] ##Request parameters [block:parameters] { "data": { "h-0": "Param", "h-1": "Required?", "h-2": "Description", "0-0": "systemToken", "1-0": "userId", "2-0": "userEmailHash", "3-0": "userEmail", "4-0": "callbackUrl", "0-1": "`Required`", "1-1": "`Required`", "2-1": "`Required`", "3-1": "`Required`", "4-1": "`Required`", "0-2": "The integrated system's unique Id provided by Rublon service in project registration.", "4-2": "The integrated system's callback URL", "1-2": "The integrated system's user's unique Id which will allow to log in the user upon successful authentication", "3-2": "The user's email address in the integrated system which will allow to check the user's protection status and match the user to a Rublon account", "2-2": "SHA256 hash generated from lowercased user email." }, "cols": 3, "rows": 5 } [/block] ##Responses This API call should return standard response for successful HTTP requests (status code 200). [block:parameters] { "data": { "h-0": "request", "h-1": "response", "0-0": "valid", "0-1": "JSON with `status`='OK' and unique `webURI` (browser should be redirected to this address for Trusted Device verification).", "1-0": "invalid", "1-1": "JSON with `status`='ERROR' and appropriate `errorMessage`." }, "cols": 2, "rows": 2 } [/block] ### Response format [block:code] { "codes": [ { "code": "{\n \"status\": \"OK\",\n \"result\": {\n \"webURI\": \"https://code.rublon.com/api/v3/web/9UHbkVQfhz0pZb0wnxTCw7ZgtsWKZTum0sgPe3MIeaWMUK9Ec96kXKOH5NWg4LhqfIPjeo9mK6jOkDDDats0mSjfOLHgS98343Yp\"\n }\n}", "language": "json", "name": "200 OK" }, { "code": "{\n \"status\": \"ERROR\",\n \"result\": {\n \"errorMessage\": \"Error: ConsumerNotFound_RublonAPIException\",\n \"exception\": \"ConsumerNotFound_RublonAPIException\"\n }\n}", "language": "json", "name": "200 ConsumerNotFound" }, { "code": "{\n \"status\": \"ERROR\",\n \"result\": {\n \"errorMessage\": \"Error: InvalidSignature_RublonAPIException\",\n \"exception\": \"InvalidSignature_RublonAPIException\"\n }\n}", "language": "json", "name": "200 InvalidSignature" } ] } [/block] ## Request and response example [block:html] { "html": "<div class=\"try-results\"><div class=\"try-results-status\"><span ng-model=\"tryResults.status\" class=\"httpstatus ng-isolate-scope ng-pristine ng-valid\"><span class=\"ng-binding httpsuccess\" ng-class=\"{httpsuccess: status[2], httperror: !status[2]}\"><i class=\"fa fa-circle\"></i> 200 <em class=\"ng-binding\">OK</em></span></span></div><pre class=\"try-results-panel ng-binding\">{\n \"status\": \"OK\",\n \"result\": {\n \"webURI\": \"https://code.rublon.com/api/v3/web/DsbAr8AswCwyPL2IQOoHV0mwp9vZ9YqMbQaP7yOgPQlWO0C2xaxNz0QBeUOlwXhix46NRj2gH4LCopCXTiGcgUnIzMqNx6iAZSAQ\"\n }\n}</pre><div class=\"try-results-panel\"><table><tbody><tr><th>Method</th><td class=\"ng-binding\">POST</td></tr><tr><th>Request Headers</th><td> <pre class=\"ng-binding\">Accept: application/json, text/javascript, */*; q=0.01\nExpect: 200-OK\nX-Rublon-Technology: rublon-php-sdk\nX-Rublon-API-Version: 3.7.1\nX-Rublon-API-Version-Date: 2015-07-02\nX-Rublon-Signature: 59845a7d8dfe0b107e07a95dc6db2bc8850f4f3b51889aedafc9743acfa19570\naccept-encoding: gzip\ncontent-type: application/json\ncontent-length: 234</pre></td></tr><tr><th>URL</th><td class=\"ng-binding\">https://code.rublon.com/api/v3/beginTransaction</td></tr><tr><th>Request Data</th><td><pre class=\"ng-binding\">{\n \"systemToken\": \"A57C9FD26182435FA08DC909C342C37X\",\n \"userId\": \"12345\",\n \"userEmailHash\": \"60a6a37a379dfeed320e8cbd808acbe4e9ab5d264d112f35126d00f50616f64f\",\n \"userEmail\": \"example@rublon.com\",\n \"callbackUrl\": \"http://example.com?rublon=callback\"\n}</pre></td></tr><tr><th>Status</th><td> <span ng-model=\"tryResults.status\" class=\"httpstatus ng-isolate-scope ng-pristine ng-valid\"><span class=\"ng-binding httpsuccess\" ng-class=\"{httpsuccess: status[2], httperror: !status[2]}\"><i class=\"fa fa-circle\"></i> 200 <em class=\"ng-binding\">OK</em></span></span></td></tr><tr><th>Response Headers</th><td><pre class=\"ng-binding\">server: nginx\ndate: Fri, 25 Sep 2015 08:08:18 GMT\ncontent-type: application/json\ntransfer-encoding: chunked\nconnection: keep-alive\nset-cookie: rublon_code_session=a%3A5%3A%7Bs%3A10%3A%22session_id%22%3Bs%3A32%3A%2203c91495160427a0e459d4b01a70dde9%22%3Bs%3A10%3A%22ip_address%22%3Bs%3A12%3A%2254.145.2.221%22%3Bs%3A10%3A%22user_agent%22%3Bb%3A0%3Bs%3A13%3A%22last_activity%22%3Bi%3A1443168497%3Bs%3A9%3A%22user_data%22%3Bs%3A0%3A%22%22%3B%7Dbe75f076b3485eb8cbb977ff5033fe4e; path=/; secure; httponly\nexpires: Sat, 26 Jul 1997 05:00:00 GMT\nlast-modified: Fri, 25 Sep 2015 08:08:17 GMT\ncache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0\npragma: no-cache\nx-rublon-signature: 2d89c14dbba68bf92b12b8df075c915a3a95abd9aef3ed953b631dc70ae99c65\nx-rublon-api-version: 3.7.0\nx-rublon-api-version-date: 2014-05-20\nstrict-transport-security: max-age=2592000</pre></td></tr></tbody></table></div></div>\n\n<style></style>" } [/block]