{"_id":"5975a8678c603c001f7071ca","project":"54eb50e5615ffc1900305a16","version":{"_id":"54eb63b859b1172100334fae","project":"54eb50e5615ffc1900305a16","forked_from":"54eb63a1867e1917009b711d","__v":28,"createdAt":"2015-02-23T17:30:32.501Z","releaseDate":"2015-02-23T17:30:32.501Z","categories":["54eb63b959b1172100334faf","54eb63b959b1172100334fb0","54eb63b959b1172100334fb1","54eb63b959b1172100334fb2","54ed8dd4ab373e2300f50eae","54ed99b2ab373e2300f50ede","55153a6de68daa2f00cff838","551546edbc466623002afe72","5515472ac28d6125001b8884","55154749c28d6125001b8885","555d9b4106dfec0d00d38ea7","5613e06e433e5735007c7708","5624bbb785a31117001c5403","56669e857cc81e0d00253f8e","568b8d837a42220d00498311","56a632277ef6620d00e2f18a","56d8147c3eb4dd0b00201aac","57a9ce2fac6db30e000d7efd","57a9cf4e944ea60e00dc3f74","58172386715dce0f00da4aa0","582dc59ee1b8692300c0dd03","589b19b4fec2730f0082e040","58b04a023529383900a759b5","58b92d1598157a0f004869bf","592e7685c58275000f20174f","59392839e376d4002f8a0474","59393064e376d4002f8a05a1","5947ae0d4005e2000f3a4fec","594a74df1d1de5001ab3517a","5954bc387a147f001b918915","59b8eeeb707542001076d3b6"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"category":{"_id":"5954bc387a147f001b918915","project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-06-29T08:37:12.853Z","from_sync":false,"order":7,"slug":"omni-chat","title":"OMNI Chat"},"user":"58e784459df3dc2d000d5e99","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-07-24T07:57:27.847Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":8,"body":"People can discover and enter a conversation with you from multiple channels and, when registering, the user is assigned a unique `key`.\n\nCommunication can be started in different ways from various channels:\n* [Facebook Messenger integration](doc:omni-chat-facebook-integration) ](#integration-setup) \n* [LINE integration](doc:omni-chat-line-integration) (#integration-setup)\n* [Viber integration](doc:omni-chat-viber-integration) ](#integration-setup) \n* [Telegram integration](doc:omni-chat-telegram-integration) ](#integration-setup) \n\nIn order to retrieve User data, the Application must first be created on the Infobip's platform and Integration has to be added.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/aa385e2-OmniChatUser.png\",\n        \"OmniChatUser.png\",\n        481,\n        81,\n        \"#dfd4ce\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"User key\",\n  \"body\": \"User `key` is used as a recipient address when [sending messages over API](docs/omni-chat-send-message).\"\n}\n[/block]\nAvailable methods\n\n* [Get users](#get-users) \n[block:api-header]\n{\n  \"title\": \"Get users\"\n}\n[/block]\nThis method is used for getting application users. \n\n```\nhttps://api.infobip.com/omnichat/1/applications/{applicationKey}/users\n```\n###Path params\n\n|Parameter|Type|Default value|Description|\n|-|-|-|\n|applicationKey|string|-|Application key|\n\n###Query params\n\n|Parameter|Type|Default value|Description|\n|-|-|-|\n|limit|integer|10000|Number of users in the response. Max is 10000.|\n\n###Response\nCan contain 5 fields, depending on available user data. `Key` and `integrationType` are obligate, `firstName`, `lastName` and `username` are optional, depending on integration and avilable user data. \n\n###Request example\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /omnichat/1/applications/8F0792F86035A9F4290821F1EE6BC06A/users HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n###Response example\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[\\n    {\\n        \\\"key\\\": \\\"A39311A5543180632DF25F8CE63BD21C28C12E83BC83D449BC4A9F32F1AE3C3E\\\",\\n        \\\"integrationType\\\": \\\"FACEBOOK\\\"\\n    },\\n    {\\n        \\\"key\\\": \\\"24F8599DF1A67F0DDF4BC67CC3D9AF8028C12E83BC83D449BC4A9F32F1AE3C3E\\\",\\n        \\\"integrationType\\\": \\\"FACEBOOK\\\",\\n        \\\"firstName\\\": \\\"firstName\\\",\\n        \\\"lastName\\\": \\\"lastName\\\"\\n    },\\n    {\\n        \\\"key\\\": \\\"7E705E15013B7576976160386C42F61E\\\",\\n        \\\"integrationType\\\": \\\"TELEGRAM\\\",\\n        \\\"firstName\\\": \\\"firstName\\\"\\n    },\\n    {\\n        \\\"key\\\": \\\"986ABBBD989A7430A27439B955F2AEDA\\\",\\n        \\\"integrationType\\\": \\\"TELEGRAM\\\",\\n        \\\"firstName\\\": \\\"firstName\\\",\\n    \\t\\t\\\"lastName\\\": \\\"lastName\\\"\\n      \\t\\\"username\\\": \\\"username\\\"\\n    },\\n    {\\n        \\\"key\\\": \\\"1238D9066C9A56D7A0303FDC8EC445BE904AFA23640426BDAC683138851A7C3C\\\",\\n        \\\"integrationType\\\": \\\"VIBER\\\",\\n        \\\"username\\\": \\\"Username\\\"\\n    },\\n    {\\n        \\\"key\\\": \\\"3DF1D5E29A99F1BBB9C344F3B0E635FBDDA7F8B33417374ACC02F5265527E6\\\",\\n        \\\"integrationType\\\": \\\"LINE\\\",\\n        \\\"username\\\": \\\"Username\\\"\\n    }\\n]\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"User represents an Application end user who is engaging in a conversation with your organization.","slug":"omni-chat-user","type":"basic","title":"User"}

User

User represents an Application end user who is engaging in a conversation with your organization.

People can discover and enter a conversation with you from multiple channels and, when registering, the user is assigned a unique `key`. Communication can be started in different ways from various channels: * [Facebook Messenger integration](doc:omni-chat-facebook-integration) ](#integration-setup) * [LINE integration](doc:omni-chat-line-integration) (#integration-setup) * [Viber integration](doc:omni-chat-viber-integration) ](#integration-setup) * [Telegram integration](doc:omni-chat-telegram-integration) ](#integration-setup) In order to retrieve User data, the Application must first be created on the Infobip's platform and Integration has to be added. [block:image] { "images": [ { "image": [ "https://files.readme.io/aa385e2-OmniChatUser.png", "OmniChatUser.png", 481, 81, "#dfd4ce" ] } ] } [/block] [block:callout] { "type": "info", "title": "User key", "body": "User `key` is used as a recipient address when [sending messages over API](docs/omni-chat-send-message)." } [/block] Available methods * [Get users](#get-users) [block:api-header] { "title": "Get users" } [/block] This method is used for getting application users. ``` https://api.infobip.com/omnichat/1/applications/{applicationKey}/users ``` ###Path params |Parameter|Type|Default value|Description| |-|-|-| |applicationKey|string|-|Application key| ###Query params |Parameter|Type|Default value|Description| |-|-|-| |limit|integer|10000|Number of users in the response. Max is 10000.| ###Response Can contain 5 fields, depending on available user data. `Key` and `integrationType` are obligate, `firstName`, `lastName` and `username` are optional, depending on integration and avilable user data. ###Request example [block:code] { "codes": [ { "code": "GET /omnichat/1/applications/8F0792F86035A9F4290821F1EE6BC06A/users HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==", "language": "json" } ] } [/block] ###Response example [block:code] { "codes": [ { "code": "[\n {\n \"key\": \"A39311A5543180632DF25F8CE63BD21C28C12E83BC83D449BC4A9F32F1AE3C3E\",\n \"integrationType\": \"FACEBOOK\"\n },\n {\n \"key\": \"24F8599DF1A67F0DDF4BC67CC3D9AF8028C12E83BC83D449BC4A9F32F1AE3C3E\",\n \"integrationType\": \"FACEBOOK\",\n \"firstName\": \"firstName\",\n \"lastName\": \"lastName\"\n },\n {\n \"key\": \"7E705E15013B7576976160386C42F61E\",\n \"integrationType\": \"TELEGRAM\",\n \"firstName\": \"firstName\"\n },\n {\n \"key\": \"986ABBBD989A7430A27439B955F2AEDA\",\n \"integrationType\": \"TELEGRAM\",\n \"firstName\": \"firstName\",\n \t\t\"lastName\": \"lastName\"\n \t\"username\": \"username\"\n },\n {\n \"key\": \"1238D9066C9A56D7A0303FDC8EC445BE904AFA23640426BDAC683138851A7C3C\",\n \"integrationType\": \"VIBER\",\n \"username\": \"Username\"\n },\n {\n \"key\": \"3DF1D5E29A99F1BBB9C344F3B0E635FBDDA7F8B33417374ACC02F5265527E6\",\n \"integrationType\": \"LINE\",\n \"username\": \"Username\"\n }\n]", "language": "json" } ] } [/block]