{"_id":"59c45507772699001c0f1e14","project":"54e405191e51932d006abc39","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"},"category":{"_id":"59c451b7772699001c0f1df1","project":"54e405191e51932d006abc39","version":"55fa37c88065a10d004e5bb6","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-09-21T23:56:39.346Z","from_sync":false,"order":9,"slug":"ui-as-a-service","title":"UI as a Service"},"user":"54e4044e8ef7552300409dcb","__v":5,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-09-22T00:10:47.527Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"get","examples":{"codes":[{"code":"GET /v3.1/client?issue_public_key=YES&scope=OAUTH|POST,USERS|POST,USERS|GET,USER|GET,USER|PATCH,SUBSCRIPTIONS|GET,SUBSCRIPTIONS|POST,SUBSCRIPTION|GET,SUBSCRIPTION|PATCH,CLIENT|REPORTS,CLIENT|CONTROLS HTTP/1.1\nHost: uat-api.synapsefi.com\nX-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_2bb1e714edd311e6bd04e285d6015267\nContent-Type: application/json","language":"http"}]},"results":{"codes":[{"name":"","code":"{\n    \"client\": {\n       ...\n    },\n    \"public_key_obj\": {\n        \"client_obj_id\": \"589acd9ecb3cd400fa75ac06\",\n        \"expires_at\": \"1506039889\",\n        \"expires_in\": \"900\",\n        \"public_key\": \"public_key_SxfMV0uJ2qEXc5gjiCt4ebKnYIwDA3mURv7OrsTW\",\n        \"scope\": [\n            \"OAUTH|POST\",\n            \"USERS|POST\",\n            \"USERS|GET\",\n            \"USER|GET\",\n            \"USER|PATCH\",\n            \"SUBSCRIPTIONS|GET\",\n            \"SUBSCRIPTIONS|POST\",\n            \"SUBSCRIPTION|GET\",\n            \"SUBSCRIPTION|PATCH\",\n            \"CLIENT|REPORTS\",\n            \"CLIENT|CONTROLS\"\n        ]\n    }\n}","language":"json","status":200}]},"settings":"","auth":"required","params":[{"_id":"59c45507772699001c0f1e16","ref":"","in":"query","required":true,"desc":"Set this to `YES`","default":"","type":"boolean","name":"issue_public_key"},{"_id":"59c45507772699001c0f1e15","ref":"","in":"query","required":false,"desc":"Scopes that you wish to issue the public keys for.","default":"","type":"string","name":"scope"}],"url":"/v3.1/client"},"isReference":false,"order":0,"body":"To be able to use any UIaaS product, you would need to issue a public key which is a token representing your client credentials. Public key expiration times are fairly short (see below), so we recommend issuing a new key for each session.\n\nWe also recommend only issuing a public key with the scopes that are absolutely needed to make the UIaaS interface work. We will mention the scopes on every interface document for you so that its easy to figure out.\n[block:api-header]\n{}\n[/block]\n## Scopes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Scope\",\n    \"h-1\": \"Effect\",\n    \"0-0\": \"OAUTH|POST\",\n    \"1-0\": \"USERS|POST\",\n    \"2-0\": \"USERS|GET\",\n    \"3-0\": \"USER|GET\",\n    \"4-0\": \"USER|PATCH\",\n    \"5-0\": \"SUBSCRIPTIONS|GET\",\n    \"6-0\": \"SUBSCRIPTIONS|POST\",\n    \"7-0\": \"SUBSCRIPTION|GET\",\n    \"8-0\": \"SUBSCRIPTION|PATCH\",\n    \"9-0\": \"CLIENT|REPORTS\",\n    \"10-0\": \"CLIENT|CONTROLS\",\n    \"0-1\": \"Allows public key to OAuth users.\",\n    \"1-1\": \"Allows public key to create users.\",\n    \"2-1\": \"Allows public key to get users.\",\n    \"3-1\": \"Allows public key to get a user.\",\n    \"4-1\": \"Allows public key to update users.\",\n    \"5-1\": \"Allows public key to get subscriptions.\",\n    \"6-1\": \"Allows public key to create subscriptions.\",\n    \"7-1\": \"Allows public key to get a subscription.\",\n    \"8-1\": \"Allows public key to update a subscription.\",\n    \"9-1\": \"Allows public key to view client reports.\",\n    \"10-1\": \"Allows public key to view client controls.\"\n  },\n  \"cols\": 2,\n  \"rows\": 11\n}\n[/block]\nIf you are issuing a public key with only `CLIENT|CONTROLS` as the scope, public key would expire in **24 hours**, otherwise public keys expire in **15 minutes**.\n\nEven if you are issuing a public key with just scope `CLIENT|CONTROLS`, we still recommend issuing a new public key for each session, since we might make the expire times shorter than 24 hours in the near future.","excerpt":"","slug":"issuing-public-key","type":"endpoint","title":"Issuing Public Key"}

getIssuing Public Key


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

issue_public_key:
required
boolean
Set this to `YES`
scope:
string
Scopes that you wish to issue the public keys for.

Examples


Result Format


Documentation

To be able to use any UIaaS product, you would need to issue a public key which is a token representing your client credentials. Public key expiration times are fairly short (see below), so we recommend issuing a new key for each session. We also recommend only issuing a public key with the scopes that are absolutely needed to make the UIaaS interface work. We will mention the scopes on every interface document for you so that its easy to figure out. [block:api-header] {} [/block] ## Scopes [block:parameters] { "data": { "h-0": "Scope", "h-1": "Effect", "0-0": "OAUTH|POST", "1-0": "USERS|POST", "2-0": "USERS|GET", "3-0": "USER|GET", "4-0": "USER|PATCH", "5-0": "SUBSCRIPTIONS|GET", "6-0": "SUBSCRIPTIONS|POST", "7-0": "SUBSCRIPTION|GET", "8-0": "SUBSCRIPTION|PATCH", "9-0": "CLIENT|REPORTS", "10-0": "CLIENT|CONTROLS", "0-1": "Allows public key to OAuth users.", "1-1": "Allows public key to create users.", "2-1": "Allows public key to get users.", "3-1": "Allows public key to get a user.", "4-1": "Allows public key to update users.", "5-1": "Allows public key to get subscriptions.", "6-1": "Allows public key to create subscriptions.", "7-1": "Allows public key to get a subscription.", "8-1": "Allows public key to update a subscription.", "9-1": "Allows public key to view client reports.", "10-1": "Allows public key to view client controls." }, "cols": 2, "rows": 11 } [/block] If you are issuing a public key with only `CLIENT|CONTROLS` as the scope, public key would expire in **24 hours**, otherwise public keys expire in **15 minutes**. Even if you are issuing a public key with just scope `CLIENT|CONTROLS`, we still recommend issuing a new public key for each session, since we might make the expire times shorter than 24 hours in the near future.