Send Message With Attachment

Step 1. Get Url to Upload File

Call API:
https://applozic.appspot.com/rest/ws/aws/file/url?data=1532966195593

where data = current time in milliseconds.

API Response String:

https://applozic.appspot.com/_ah/upload/AMmfu6aM5pSiFldSC6P712_67rJUbhM2esVCASnkDaywKyBC0jrOZ8Rce9kA_N_C9eE6kS1D1agdAogaGF6erctiiPbYhwLoDuJgjHIB4BzpGg3uAQQ2UZh5ZaakxeWCinF5yBrR-gaQM5_pis4sCwY8It6-cABVrA/ALBNUaYAAAAAW183kZRZP3A480j6ri2ALQTsZoLvlhvF/

Step 2. Call Above Url With multipart :

Call API with your file object attached to files[] array:

https://applozic.appspot.com/_ah/upload/AMmfu6aM5pSiFldSC6P712_67rJUbhM2esVCASnkDaywKyBC0jrOZ8Rce9kA_N_C9eE6kS1D1agdAogaGF6erctiiPbYhwLoDuJgjHIB4BzpGg3uAQQ2UZh5ZaakxeWCinF5yBrR-gaQM5_pis4sCwY8It6-cABVrA/ALBNUaYAAAAAW183kZRZP3A480j6ri2ALQTsZoLvlhvF/

fileMeta json Response:

{
   “fileMeta”: {
       “blobKey”: “AMIfv94owfV8vmaAHY5ISFf0aM_UHflqyEHpBvfYzn9q6i2BlxyI76JmbDx9lVHjGyqnVTpvJg-_s6EXibfgRxln9p6z7YdWTa8DA-TDH3yxtvXFsLFEcQ8eHWUFpqagmbcTM3mkE-qoPXMbgLVXTl9iceqAIuvICA”,
       “contentType”: “image/gif”,
       “createdAtTime”: “1532966377442”,
       “name”: “applozic_logo.gif”,
       “size”: “15608”,
       “thumbnailUrl”: “https://lh3.googleusercontent.com/9PBCW_pExEF7g-VsheISFMFulTZdxgOjNT4iNnZyT4ns-CPqjQxjpW8-_YZFsdkDZnyBRg5aX-MO1CekmVCe=s120"
   }
}

Step 3. Send Message with attachment (FileMeta Json):

Call API:
https://apps.applozic.com/rest/ws/message/v2/send

Request Body:

{
 “type”:5,
 “to”: “user02”,
 “message”: “Check this image”,
  “fileMeta”: {
       “blobKey”: “AMIfv94owfV8vmaAHY5ISFf0aM_UHflqyEHpBvfYzn9q6i2BlxyI76JmbDx9lVHjGyqnVTpvJg-_s6EXibfgRxln9p6z7YdWTa8DA-TDH3yxtvXFsLFEcQ8eHWUFpqagmbcTM3mkE-qoPXMbgLVXTl9iceqAIuvICA”,
       “contentType”: “image/gif”,
       “createdAtTime”: “1532966377442",
       “name”: “applozic_logo.gif”,
       “size”: “15608",
       “thumbnailUrl”: “https://lh3.googleusercontent.com/9PBCW_pExEF7g-VsheISFMFulTZdxgOjNT4iNnZyT4ns-CPqjQxjpW8-_YZFsdkDZnyBRg5aX-MO1CekmVCe=s120”
   }
}

Send Message Api Response Json:

{
   “status”: “success”,
   “generatedAt”: 1532966617428,
   “response”: {
       “messageKey”: “5-9ccfc5fd-542d-4595-8eee-1e94a5d66293-1532966617397",
       “createdAt”: 1532966617409
   }
}