Using Messaging API to Send API
Navigate to the Send API page by:
Selecting Messaging API from the application switcher
Navigate to Send API on the navigation panel to the left
Once you have completed the steps above, you will see a similar page to the one below:
Before you start, you want to make sure you have some details required to send an outbound API call. A list of required details is shown below:
Destination number
Account API password
Message content
Tag number (Optional)
Receipt URL (Optional)
Once you have the information required you may begin by locating the "Destination number" option at the top of the list and enter the number you wish to send an outbound message to. You should notice that the information you add to this box is updated in the panel to the right as shown below.
The next option that is required is the "Account API ID". In this field, the input option automatically extracts your account API ID from the current account you are logged in with and place it into this input area. A value should already be entered here for your account and nothing needs to be added or changed here.
You will also be asked to enter a password for your API account. The password will not automatically be censored as it is displayed in the panel to the right. Your API password should've been sent to you to your organization when you first signed up for the platform.
Next, you will be asked to enter the message content you wish to send to the destination number.
The rest of the options are completely optional. You will have the option to enter a tag for the outbound API call. This tag is simply a source number for the message so the receiver is aware of where the message has been sent from. You may select a number from the list. However, you may leave this empty but if left empty, a default number will be used.
You will then be asked if you want to return the response in JSON format. If you would like to leave it in plain text form then you may leave the value at 0. However, if you need it returned in JSON format, then set the value to 1.
The final option asks if you want to add a receipt URL. The receipt URL is where Octopus will send all the receipts of each message if a value is entered.
Now that you have all the information entered correctly, you can then copy the code sample generated in your desired format. To select between desired coding format, you will simply just have to select it at the top of the right-hand side panel.
Once you have copied the code sample you can use this to integrate the Messaging API into your application.