Integration with your server

Introduction

Panacea Mobile’s USSD gateway also allows you to fetch plain text from a web address and display it to a user when they dial your USSD string. User responses can also be pushed back to this address and fetch new text to display, effectively giving you complete control of the campaign/service from your own server. This is called a Proxy Campaign.

Setting up a Proxy Campaign

When setting up a new USSD campaign from your Panacea Mobile Account Dashboard, select Proxy Campaign from the Campaign Type drop-down menu on the New Campaign modal window. This will reveal a new text field to paste the URL that must be called when a new USSD session is started.

What this will do is, when users enter that node, the text they see will be provided by your server, and when they respond there will be no response matched and call your server for the ‘error’ text, essentially creating a proxy. Once you are ready to end the session with the user you will need to include the header in your response headers:

X-ussd-close: 1

Our service will then close the session with the user and allow no further responses.

HTTP Requests

Panacea Mobile’s USSD service can make HTTP requests to your own server to fetch plain text to display on a node in the following scenarios:

  • You have selected 'Text from URL' as a response type on a node

  • You have chosen 'Text from URL' as a response type for error text on a node

  • You have created actions of 'HTTP Request' on your node

Text from URL Request

When you have selected text from the URL as a response type, the Panacea Mobile USSD service will connect to your server to determine what content to show the user.

The request will contain the following data in the query string.

Error text from URL Request

This request is the same structure as a standard Text from a URL request.

HTTP Request action

This request is the same structure as a standard Text from URL request.

Last updated