Basic usage of the getMessage/getMessages

The following steps described how to create a getMessage/getMessages API call using Postman.

Procedure:

  1. Get info for a single message
    1. Create a new Get request in Postman and set the following URL https://api.leanplum.com/api?action=getMessage
    2.  As a request parameters set the
      appId=<app id of your Leanplum app> 
      clientKey=<the Read-only key of you Leanplum app>, 
      apiVersion=1.0.6
      id=<the message id for which you will request the info>
      1. We can get the appId and the clientKey from the dashboard from the App Setting sectionScreenshot_2021-03-25_at_9.42.26.png
      2. The id of the message can be taken from the message URLScreenshot_2021-03-25_at_9.51.23.png
    3. As a result, you will receive a JSON object with the message info(messageType, name, status, etc.)Screenshot_2021-03-25_at_9.57.33.png
  2. Get info for all message/campaign's actions from the dashboard
    1. Create a new Get request in Postman and set the following URL https://api.leanplum.com/api?action=getMessages
    2. As a request parameters set the
      appId=<app id of your Leanplum app> 
      clientKey=<the Read-only key of you Leanplum app>, 
      apiVersion=1.0.6
      includeDrafts=<set to true - for including the drafts and to false - if not>
      recent=<set to false - for recieving all messages, true - for returning the recent one>
      1. Get the appId and the clientKey from the dashboard from the App Setting section. Screenshot_2021-03-25_at_9.42.26.png
    3. As a result, you will receive an array with the info for all messages and the actions from the campaigns.Screenshot_2021-03-25_at_10.12.48.png

What's next:

getMessage API method

getMessages API method

 


Was this article helpful?
Have more questions? Submit a request