Mobile Push and In-App Messages
Receive mobile app users' responses over API

Receive Mobile App Users' Responses over API

Infobip supports receiving incoming push notifications from mobile app users. When it comes to receiving incoming messages, you can choose between two basic methods:

  • HTTP forward method - Allows you to receive incoming messages from your mobile app users in real time.
  • Pull method - Allows you to fetch new messages from the Infobip server over API whenever you want.

Before you can start receiving messages, you need to configure the application for incoming messages. You can find instructions on how to set up each scenario in the Configuration section below. It’s up to you to decide which method to use, depending on your use case.

HTTP Forward Method

Use this method to receive incoming messages in real time. Every message received from a mobile app user will be forwarded to an arbitrary URL provided in the Action Setup. The arbitrary URL should be able to receive POST requests.

Pull Method

All messages received from your mobile app users will be received on the Infobip platform and will be there until you decide to access them over API call (opens in a new tab) which will return the received messages.

NOTE

All received messages can be pulled only once. Once a certain message has been pulled by this method, it will not be available in the next API call. This means that you will only see the messages received since the last API request you made.

Configuration

The Configuration is a logical container for actions. You can choose a method of incoming message delivery through the Action setup, but before you do that, you must create the configuration.

List All Configurations

Each application within the Infobip platform is uniquely identified with the APPLICATION CODE.

Use the list all configurations (opens in a new tab) method to get all configurations of your application. If successful, you will receive a list of configurationKeys.

Get Single Configuration

Use the APPLICATION CODE and Configuration Key to get single configuration (opens in a new tab).

Path parameters

ParameterTypeDescription
applicationCodestringApplication code
configurationKeystringConfiguration key

Create New Configuration

Each application within the Infobip platform is uniquely identified with the APPLICATION CODE. Use this method (opens in a new tab) to create a new configuration within the application. If successful, you will receive a configurationKey. Attempting to create a new configuration when another configuration already exists will result in the 409 CONFLICT status.

Delete configuration

To delete the configuration, use this method (opens in a new tab) with the configurationKey (opens in a new tab) you want to delete and APPLICATION CODE you want to delete the configuration from.

Path parameters

ParameterTypeDescription
applicationCodestringApplication code
configurationKeystringConfiguration key

Setup Action

Action Models

Different actions have different models depending on the logic that the action triggers. These models are used as a request and response bodies for GET and POST methods.

HTTP FORWARD Action

Property nameTypeDescription
keystringThe action's key.
typestringConstant value - HTTP_FORWARD
forwardUrlstringURL to which the received message will be forwarded to.
callbackDatastringOptional. The string that will be forwarded alongside the usual fields posted to forwardUrl.

Pull Action

Property nameTypeDescription
keystringAction key.
typestringConstant value - PULL.
callbackDatastringOptional. The string that will be forwarded alongside the usual fields posted to forwardUrl.

List All Actions

Use the list all actions (opens in a new tab) method to return actions for a given application configuration, if any. If successful, response will contain all actions for the given configuration.

ParameterTypeDescription
actionsstringList or actions.
keystringApplication code.
typestringAction type.
forwardUrlstringForward URL.

Create New Action

To create a new action for configuration within application use the create a new action (opens in a new tab) method.

Path parameters

ParameterTypeDescription
applicationCodestringApplication code
configurationKeystringConfiguration key

Request example

HTTP FORWARD

json
 
    {
    
        "type": "HTTP_FORWARD",
    
        "forwardUrl": "https://www.myDomain.com/messageReceiver",
    
        "callbackData": "callbackData"
    

 

Request example

Pull

json
 
    {
        "type": "PULL",
        "callbackData": "callbackData"
    }
 

Delete Action

To delete an action use the delete (opens in a new tab) method.

Path parameters

ParameterTypeDescription
applicationCodestringApplication code
configurationKeystringConfiguration key
actionKeystringAction key

Need assistance

Explore Infobip Tutorials

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary

Research panel

Help shape the future of our products
Service Terms & ConditionsPrivacy policyTerms of use