VIBER. How to get a link to an image

Tell me how to get a link to an image when sending an image to a user via a chat bot. According to the documentation, we create an object

{  
"receiver":"01234567890A=",
  "min_api_version":1,
  "sender":{  
  "name":"John McClane",
  "avatar":"http://avatar.example.com"
  },
  "tracking_data":"tracking data",
  "type":"picture",
  "text":"Photo description",
  "media":"http://www.images.com/img.jpg",
  "thumbnail":"http://www.images.com/thumb.jpg"
}

And where/how to get the link "media":"..."?

Author: GoodWin, 2020-04-13

1 answers

I mean where to get it :) This is the URL of the image that you are going to send to the recipient... Take any image put it on some network resource, specify the path to it in the field media

For example, if you want to send your avatar with a smart look in glasses:

enter a description of the image here

Then the URL will be like this:

 "media":"https://i.stack.imgur.com/QatwZ.jpg?s=328&g=1"
 0
Author: Barmaley, 2020-04-13 13:54:08