Status: Open
Status: Answered
Status: Closed
Status: Duplicate


Posted Apr 09 by Brian Richardson.
Updated Apr 10 by Werner De Jong.

I tried following the following tutorial:

but i was unable to get the notifications feature working, i am having trouble structuring the request properly.

Here is an example of what i am trying to submit, following the convention of the tutorial:

  "body":"this is a test, this is only a test",     
  "header":"this is a test"   

I have tried several combination of using quotes and without - no difference, same error

This is the error i receive:

HTTP Status 400 -

type Status report


description The request sent by the client was syntactically incorrect.

It would make things a lot easier if the entire payload used the JSON structure.

    "key": "someKey",
    "users": ["usr1","usr2","usr3"],
    "message": {}

Can someone post a sample of what the POST payload should look like.

Any help would be appreciated.


2 Answers

BEST ANSWER: As chosen by the author.

Hi Brian,

Many thanks for your post. I have asked for assistance from the product team.



BEST ANSWER: As chosen by the author.

Code might be clearest:

 url: '...',
 type: 'POST',
 data: {
  key: key,
  users: 'user1,user2,user3'
  message: JSON.stringify({displayType: 'show', body: 'test'});

I agree with your point about the all-JSON payload. The appworks convention to date has been to use urlencoded params rather than an application/json entity. For some uses (particularly in strongly-typed languages), this is simpler than building JSON structures. In this case, likely not.

 You have subscribed and will receive email notifications of updates to this topic. To unsubscribe, uncheck the checkbox.


Related categories

Related tags

Your answer

To leave an answer, please sign in.