{"_id":"560221418a6c97170066cf48","category":{"_id":"560220af7435de0d00fabd0d","__v":1,"project":"54e405191e51932d006abc39","pages":["560313793ee4af170004720c"],"version":"55fa37c88065a10d004e5bb6","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-09-23T03:46:55.703Z","from_sync":false,"order":4,"slug":"oauth","title":"OAuth & Fingerprint"},"editedParams2":true,"parentDoc":null,"project":"54e405191e51932d006abc39","user":"54e4044e8ef7552300409dcb","version":{"_id":"55fa37c88065a10d004e5bb6","project":"54e405191e51932d006abc39","__v":11,"createdAt":"2015-09-17T03:47:20.956Z","releaseDate":"2015-09-17T03:47:20.956Z","categories":["55fa37ca8065a10d004e5bb7","55fa37ca8065a10d004e5bb8","55fa37ca8065a10d004e5bb9","55fa37ca8065a10d004e5bba","55fca6bf34ae7c0d00ab8ea0","55ff80fd9e7ccf0d000a1d93","560220af7435de0d00fabd0d","56107f21bb9d920d00303e70","563e184077681a0d00d96a02","56fafc6596ec7e0e002ac85f","5915e54f7c2c552d008b8549","59499fcd64b5f5002690bbc1","59c451b7772699001c0f1df1","59c9b42dec84880010c1f348"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"REST V3","version_clean":"3.1.0","version":"3.1"},"__v":8,"editedParams":true,"updates":["56072133a4574a0d00811433","589b88be1e7c040f00ae348c","59027f7fb4fba1230094c900"],"next":{"pages":[],"description":""},"createdAt":"2015-09-23T03:49:21.845Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"client_id\": \"589acd9ecb3cd400fa75ac06\",\n    \"client_name\": \"SynapseFI\",\n    \"expires_at\": \"1498297390\",\n    \"expires_in\": \"7200\",\n    \"oauth_key\": \"oauth_bo4WXMIT5V0zKSRLYcqNwGtHZEDaA1k3pBv7r20s\",\n    \"refresh_expires_in\": 8,\n    \"refresh_token\": \"refresh_ehG7YBS8ZiD0sLa6PQHMUxryovVkJzElC5gWROXq\",\n    \"scope\": [\n        \"USER|PATCH\",\n        \"USER|GET\",\n        \"NODES|POST\",\n        \"NODES|GET\",\n        \"NODE|GET\",\n        \"NODE|PATCH\",\n        \"NODE|DELETE\",\n        \"TRANS|POST\",\n        \"TRANS|GET\",\n        \"TRAN|GET\",\n        \"TRAN|PATCH\",\n        \"TRAN|DELETE\"\n    ],\n    \"user_id\": \"594e0fa2838454002ea317a0\"\n}","name":"w/o scope"},{"code":"{\n    \"client_id\": \"589acd9ecb3cd400fa75ac06\",\n    \"client_name\": \"SynapseFI\",\n    \"expires_at\": \"1498297511\",\n    \"expires_in\": \"7200\",\n    \"oauth_key\": \"oauth_YRiB3K1opexAkltDZvc4QOEMnLSCJ8m0UN6Gasyq\",\n    \"refresh_expires_in\": 7,\n    \"refresh_token\": \"refresh_ehG7YBS8ZiD0sLa6PQHMUxryovVkJzElC5gWROXq\",\n    \"scope\": [\n        \"NODES|POST\",\n        \"NODES|GET\",\n        \"NODE|GET\",\n        \"TRANS|POST\"\n    ],\n    \"user_id\": \"594e0fa2838454002ea317a0\"\n}","language":"json","status":200,"name":"with scope"}]},"settings":"","examples":{"codes":[{"language":"http","code":"POST /v3.1/oauth/594e0fa2838454002ea317a0 HTTP/1.1\nHost: uat-api.synapsefi.com\nX-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_2bb1e714edd311e6bd04e285d6015267\nX-SP-USER-IP: 127.0.0.1\nX-SP-USER: |e83cf6ddcf778e37bfe3d48fc78a6502062fc\nContent-Type: application/json\n\n{\n    \"refresh_token\":\"refresh_ehG7YBS8ZiD0sLa6PQHMUxryovVkJzElC5gWROXq\"\n}","name":"w/o scope"},{"code":"POST /v3.1/oauth/594e0fa2838454002ea317a0 HTTP/1.1\nHost: uat-api.synapsefi.com\nX-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_2bb1e714edd311e6bd04e285d6015267\nX-SP-USER-IP: 127.0.0.1\nX-SP-USER: |e83cf6ddcf778e37bfe3d48fc78a6502062fc\nContent-Type: application/json\n\n{\n    \"refresh_token\":\"refresh_ehG7YBS8ZiD0sLa6PQHMUxryovVkJzElC5gWROXq\",\n    \"scope\":[\n        \"NODES|POST\",\n        \"NODES|GET\",\n        \"NODE|GET\",\n        \"TRANS|POST\"\n    ]\n}","language":"http","name":"with scope"}]},"method":"post","auth":"required","params":[{"_id":"5573b11e91ce6e190023b76a","ref":"","in":"body","required":true,"desc":"The current refresh token associated with the user","default":"","type":"string","name":"refresh_token"},{"_id":"589b627bd23c4d1b00855fdc","ref":"","in":"body","required":false,"desc":"OAuth key scope","default":"","type":"array_string","name":"scope"},{"_id":"589b6143d23c4d1b00855fda","ref":"","in":"body","required":false,"desc":"Phone number for 2FA","default":"","type":"string","name":"phone_number"},{"_id":"589b6143d23c4d1b00855fd9","ref":"","in":"body","required":false,"desc":"Validation Pin for 2FA","default":"","type":"string","name":"validation_pin"},{"_id":"594e74a338ae590033bfd447","ref":"","in":"path","required":true,"desc":"ID of user","default":"","type":"string","name":"user_id"}],"url":"/v3.1/oauth/:user_id"},"isReference":true,"order":1,"body":"[block:api-header]\n{\n  \"type\": \"basic\"\n}\n[/block]\n## OAuth Scopes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Scope\",\n    \"h-1\": \"Comment\",\n    \"0-0\": \"USER|PATCH\",\n    \"1-0\": \"USER|GET\",\n    \"2-0\": \"NODES|POST\",\n    \"3-0\": \"NODES|GET\",\n    \"4-0\": \"NODE|GET\",\n    \"5-0\": \"NODE|PATCH\",\n    \"6-0\": \"NODE|DELETE\",\n    \"7-0\": \"TRANS|POST\",\n    \"8-0\": \"TRANS|GET\",\n    \"9-0\": \"TRAN|GET\",\n    \"10-0\": \"TRAN|PATCH\",\n    \"11-0\": \"TRAN|DELETE\",\n    \"0-1\": \"OAuth can be used to update User document\",\n    \"1-1\": \"OAuth can be used to get User\",\n    \"2-1\": \"OAuth can be used to add Nodes\",\n    \"3-1\": \"OAuth can be used to get Nodes\",\n    \"4-1\": \"OAuth can be used to get Node\",\n    \"5-1\": \"OAuth can be used to update Node\",\n    \"6-1\": \"OAuth can be used to delete Node\",\n    \"7-1\": \"OAuth can be used to add Transaction\",\n    \"8-1\": \"OAuth can be used to get Transactions\",\n    \"9-1\": \"OAuth can be used to get Transaction\",\n    \"10-1\": \"OAuth can be used to update Transaction\",\n    \"11-1\": \"OAuth can be used to cancel Transaction\"\n  },\n  \"cols\": 2,\n  \"rows\": 12\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\"\n}\n[/block]\n\n## Registering New Fingerprint\n\nIf you wish to register a new device fingerprint to the user account and use our two factor authentication (2FA) security protocols, complete the the following steps:\n\n* Step 1: Supply the new fingerprint.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /v3.1/oauth/594e0fa2838454002ea317a0 HTTP/1.1\\nHost: uat-api.synapsefi.com\\nX-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_2bb1e714edd311e6bd04e285d6015267\\nX-SP-USER-IP: 127.0.0.1\\nX-SP-USER: |e83cf6ddcf778e37bfe3d48fc78a6502062fcxx\\nContent-Type: application/json\\n\\n{\\n    \\\"refresh_token\\\":\\\"refresh_ehG7YBS8ZiD0sLa6PQHMUxryovVkJzElC5gWROXq\\\"\\n}\",\n      \"language\": \"http\",\n      \"name\": \"Request\"\n    },\n    {\n      \"code\": \"{\\n    \\\"error\\\": {\\n        \\\"en\\\": \\\"Fingerprint not registered. Please perform the MFA flow.\\\"\\n    },\\n    \\\"error_code\\\": \\\"10\\\",\\n    \\\"http_code\\\": \\\"202\\\",\\n    \\\"phone_numbers\\\": [\\n        \\\"test:::at:::synapsepay.com\\\",\\n        \\\"901-111-2222\\\"\\n    ],\\n    \\\"success\\\": false\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ]\n}\n[/block]\n* Step 2: Supply 2FA device from the list.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /v3.1/oauth/594e0fa2838454002ea317a0 HTTP/1.1\\nHost: uat-api.synapsefi.com\\nX-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_2bb1e714edd311e6bd04e285d6015267\\nX-SP-USER-IP: 127.0.0.1\\nX-SP-USER: |e83cf6ddcf778e37bfe3d48fc78a6502062fcxx\\nContent-Type: application/json\\n\\n{\\n    \\\"refresh_token\\\":\\\"refresh_ehG7YBS8ZiD0sLa6PQHMUxryovVkJzElC5gWROXq\\\",\\n    \\\"phone_number\\\":\\\"test@synapsepay.com\\\"\\n}\",\n      \"language\": \"curl\",\n      \"name\": \"Request\"\n    },\n    {\n      \"code\": \"{\\n    \\\"error_code\\\": \\\"10\\\",\\n    \\\"http_code\\\": \\\"202\\\",\\n    \\\"message\\\": {\\n        \\\"en\\\": \\\"MFA sent to test@synapsepay.com.\\\"\\n    },\\n    \\\"success\\\": true\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ]\n}\n[/block]\n* Step 3: Verify the PIN sent to the 2FA device.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /v3.1/oauth/594e0fa2838454002ea317a0 HTTP/1.1\\nHost: uat-api.synapsefi.com\\nX-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_2bb1e714edd311e6bd04e285d6015267\\nX-SP-USER-IP: 127.0.0.1\\nX-SP-USER: |e83cf6ddcf778e37bfe3d48fc78a6502062fcxx\\nContent-Type: application/json\\n\\n{\\n    \\\"refresh_token\\\":\\\"refresh_ehG7YBS8ZiD0sLa6PQHMUxryovVkJzElC5gWROXq\\\",\\n    \\\"validation_pin\\\":\\\"594230\\\"\\n}\",\n      \"language\": \"curl\",\n      \"name\": \"Request\"\n    },\n    {\n      \"code\": \"{\\n    \\\"client_id\\\": \\\"589acd9ecb3cd400fa75ac06\\\",\\n    \\\"client_name\\\": \\\"SynapseFI\\\",\\n    \\\"expires_at\\\": \\\"1498297791\\\",\\n    \\\"expires_in\\\": \\\"7200\\\",\\n    \\\"oauth_key\\\": \\\"oauth_vxGS10t7OQzBoVJIM4Z0rbnjyXsc8lCigaH6ewRp\\\",\\n    \\\"refresh_expires_in\\\": 6,\\n    \\\"refresh_token\\\": \\\"refresh_ehG7YBS8ZiD0sLa6PQHMUxryovVkJzElC5gWROXq\\\",\\n    \\\"scope\\\": [\\n        \\\"USER|PATCH\\\",\\n        \\\"USER|GET\\\",\\n        \\\"NODES|POST\\\",\\n        \\\"NODES|GET\\\",\\n        \\\"NODE|GET\\\",\\n        \\\"NODE|PATCH\\\",\\n        \\\"NODE|DELETE\\\",\\n        \\\"TRANS|POST\\\",\\n        \\\"TRANS|GET\\\",\\n        \\\"TRAN|GET\\\",\\n        \\\"TRAN|PATCH\\\",\\n        \\\"TRAN|DELETE\\\"\\n    ],\\n    \\\"user_id\\\": \\\"594e0fa2838454002ea317a0\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"get-oauth_key-refresh-token","type":"endpoint","title":"OAuth User"}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

user_id:
required
string
ID of user

Body Params

refresh_token:
required
string
The current refresh token associated with the user
scope:
array of strings
OAuth key scope
phone_number:
string
Phone number for 2FA
validation_pin:
string
Validation Pin for 2FA

Examples


Result Format


Documentation

[block:api-header] { "type": "basic" } [/block] ## OAuth Scopes [block:parameters] { "data": { "h-0": "Scope", "h-1": "Comment", "0-0": "USER|PATCH", "1-0": "USER|GET", "2-0": "NODES|POST", "3-0": "NODES|GET", "4-0": "NODE|GET", "5-0": "NODE|PATCH", "6-0": "NODE|DELETE", "7-0": "TRANS|POST", "8-0": "TRANS|GET", "9-0": "TRAN|GET", "10-0": "TRAN|PATCH", "11-0": "TRAN|DELETE", "0-1": "OAuth can be used to update User document", "1-1": "OAuth can be used to get User", "2-1": "OAuth can be used to add Nodes", "3-1": "OAuth can be used to get Nodes", "4-1": "OAuth can be used to get Node", "5-1": "OAuth can be used to update Node", "6-1": "OAuth can be used to delete Node", "7-1": "OAuth can be used to add Transaction", "8-1": "OAuth can be used to get Transactions", "9-1": "OAuth can be used to get Transaction", "10-1": "OAuth can be used to update Transaction", "11-1": "OAuth can be used to cancel Transaction" }, "cols": 2, "rows": 12 } [/block] [block:api-header] { "type": "basic" } [/block] ## Registering New Fingerprint If you wish to register a new device fingerprint to the user account and use our two factor authentication (2FA) security protocols, complete the the following steps: * Step 1: Supply the new fingerprint. [block:code] { "codes": [ { "code": "POST /v3.1/oauth/594e0fa2838454002ea317a0 HTTP/1.1\nHost: uat-api.synapsefi.com\nX-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_2bb1e714edd311e6bd04e285d6015267\nX-SP-USER-IP: 127.0.0.1\nX-SP-USER: |e83cf6ddcf778e37bfe3d48fc78a6502062fcxx\nContent-Type: application/json\n\n{\n \"refresh_token\":\"refresh_ehG7YBS8ZiD0sLa6PQHMUxryovVkJzElC5gWROXq\"\n}", "language": "http", "name": "Request" }, { "code": "{\n \"error\": {\n \"en\": \"Fingerprint not registered. Please perform the MFA flow.\"\n },\n \"error_code\": \"10\",\n \"http_code\": \"202\",\n \"phone_numbers\": [\n \"test@synapsepay.com\",\n \"901-111-2222\"\n ],\n \"success\": false\n}", "language": "json", "name": "Response" } ] } [/block] * Step 2: Supply 2FA device from the list. [block:code] { "codes": [ { "code": "POST /v3.1/oauth/594e0fa2838454002ea317a0 HTTP/1.1\nHost: uat-api.synapsefi.com\nX-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_2bb1e714edd311e6bd04e285d6015267\nX-SP-USER-IP: 127.0.0.1\nX-SP-USER: |e83cf6ddcf778e37bfe3d48fc78a6502062fcxx\nContent-Type: application/json\n\n{\n \"refresh_token\":\"refresh_ehG7YBS8ZiD0sLa6PQHMUxryovVkJzElC5gWROXq\",\n \"phone_number\":\"test@synapsepay.com\"\n}", "language": "curl", "name": "Request" }, { "code": "{\n \"error_code\": \"10\",\n \"http_code\": \"202\",\n \"message\": {\n \"en\": \"MFA sent to test@synapsepay.com.\"\n },\n \"success\": true\n}", "language": "json", "name": "Response" } ] } [/block] * Step 3: Verify the PIN sent to the 2FA device. [block:code] { "codes": [ { "code": "POST /v3.1/oauth/594e0fa2838454002ea317a0 HTTP/1.1\nHost: uat-api.synapsefi.com\nX-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_2bb1e714edd311e6bd04e285d6015267\nX-SP-USER-IP: 127.0.0.1\nX-SP-USER: |e83cf6ddcf778e37bfe3d48fc78a6502062fcxx\nContent-Type: application/json\n\n{\n \"refresh_token\":\"refresh_ehG7YBS8ZiD0sLa6PQHMUxryovVkJzElC5gWROXq\",\n \"validation_pin\":\"594230\"\n}", "language": "curl", "name": "Request" }, { "code": "{\n \"client_id\": \"589acd9ecb3cd400fa75ac06\",\n \"client_name\": \"SynapseFI\",\n \"expires_at\": \"1498297791\",\n \"expires_in\": \"7200\",\n \"oauth_key\": \"oauth_vxGS10t7OQzBoVJIM4Z0rbnjyXsc8lCigaH6ewRp\",\n \"refresh_expires_in\": 6,\n \"refresh_token\": \"refresh_ehG7YBS8ZiD0sLa6PQHMUxryovVkJzElC5gWROXq\",\n \"scope\": [\n \"USER|PATCH\",\n \"USER|GET\",\n \"NODES|POST\",\n \"NODES|GET\",\n \"NODE|GET\",\n \"NODE|PATCH\",\n \"NODE|DELETE\",\n \"TRANS|POST\",\n \"TRANS|GET\",\n \"TRAN|GET\",\n \"TRAN|PATCH\",\n \"TRAN|DELETE\"\n ],\n \"user_id\": \"594e0fa2838454002ea317a0\"\n}", "language": "json", "name": "Response" } ] } [/block]