I'm trying to get the preset parameter to work using PHP with the PW API. Below is the snippet of code I am using. The name of my preset is 'Normal Push'. Everything else works and I am able to send pushes using the API. It's just that I want to include the badge counter and some other stuff in my preset.

pwCall('createMessage', array(
'application' => PW_APPLICATION,
'auth' => PW_AUTH,
'notifications' => array(
        array(
            'send_date' => 'now',
            'content' => "$the_message",
            'data' => array('custom' => 'json data'),
            'link' => 'http://pushwoosh.com/',
            'preset' =>'Normal Push'
        )

    )
)

);

asked 28 Sep '16, 17:11
bjulien's gravatar image

bjulien
114

You must fill value of 'preset' field with preset CODE, but not name. You can find it in Presets section of control panel, please see screenshot.

alt text

permanent link
answered 03 Oct '16, 15:28
XXXX's gravatar image

XXXX
2.2k6

Thanks, that worked.

(03 Oct '16, 16:00) bjulien bjulien's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×326
×120
×83
×33

question asked: 28 Sep '16, 17:11

question was seen: 638 times

last updated: 03 Oct '16, 16:00