1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-16 11:38:11 +02:00
OpenIntegrations/docs/en/md/Viber/Settings-and-information/Get-user-data.md
2024-06-04 21:55:01 +03:00

1.0 KiB

sidebar_position
3

Get user data

Gets user information by ID

Function GetUserData(Val Token, Val UserID) Export

Parameter CLI option Type Destination
Token --token String Token
UserID --user String, Number Viber User ID

Returns: Key-Value Pair - serialized JSON response from Viber

	
 
 Response = OPI_Viber.GetUserData(Token, UserID); //Map
 Response = OPI_Tools.JSONString(Response); //JSON string
 

	
 
 oint viber GetUserData --token %token% --user %user%


{
 "user": {
 "device_type": "iPhone8,4",
 "mnc": 1,
 "mcc": 257,
 "api_version": 10,
 "primary_device_os": "iOS 15.6.1",
 "viber_version": "21.6.0.18",
 "country": "FR",
 "language": "ru",
 "avatar": "http://dl-media.viber.com/1/share/2/long/bots/generic-avatar%402x.png",
 "name": "Subscriber",
 "id": "d3jxe6111111NkjYGgZg=="
 },
 "chat_hostname": "SN-CHAT-07_",
 "status_message": "ok",
 "status": 0
 }