Create Template and add rich messages to paritial pushpayload

I want to create a push template using java sdk.

I am able to add in app and notifications to the template, and push notifications sent out ok

but when I add rich messages, and i can't create template, the error is:

400, bad request message not allowed

 

Does airship supporting this? 

 

Example code:

PartialPushPayload.newBuilder.setRichPushMessage(
RichPushMessage.newBuilder().setBody("hey hey").setTitle("inbox").build()).build()

Didn't find what you were looking for?

New post

Comments

4 comments

  • Anyone can help?

    Comment actions Permalink
    0
  • More Error message:

    Parsing of json failed. Expected to be at field name token but was START_ARRAY

     

    my payload

    {
    "name":"dt-2020-04-01-test-28",
    "description":"dt-2020-04-01-test-28",
    "push":{
         "message":{
            "title":"push2inbox UA: {{username}} {{location}}",
             "body": "Click {{username}} {{location}}",
             "content_type":"text/html",
             "content_encoding":"utf8",
             "expiry":"2020-04-08T03:55:00",
             "icons":{
                   "list_icon":""
               }
        }
    } ,
    "variables":[
    {"key":"username","default_value":null},
    {"key":"location","default_value":null}
    ]
    }

     

    Comment actions Permalink
    0
  • Hello Qian,

    At the moment, templates with rich-push are not supported right now in the current version of the API, but they will be very soon! No ETA as of yet, but a formal email/communication will be distributed to everyone once this is available.

    Thank you and regards,

    Chilun Liu

    Airship Support

    Comment actions Permalink
    0
  • I see, thanks

    Comment actions Permalink
    0

Please sign in to leave a comment.