Skip to content

Mocean

The Mocean modules enable you to send text messages, voice messages and get balance details in your Mocean account.

Getting Started with Mocean

Prerequisites

  • A Mocean account

In order to use Mocean with Ibexa Connect, it is necessary to have a Mocean account. If you do not have one, you can create a Mocean account at moceanapi.com/.

Note

The module dialog fields that are displayed in bold (in the Ibexa Connect scenario, not in this documentation article) are mandatory!

Connecting Mocean to Ibexa Connect

To connect your Mocean account to Ibexa Connect you need to obtain your Application Name and API Key from your Mocean account and insert it in the Create a connection dialog in the Ibexa Connect module.

1. Log in to your Mocean account.

2. In the Dashboard screen, copy the API Key and Secret Token to your clipboard.

61f273adc3abe.png

3. Go to Ibexa Connect and open the Mocean's module Create a connection dialog.

61f273aedfa29.gif

5. In the Connection name field, enter a connection name.

6. In the API Key and API Secret fields, enter the API key and secret token copied in step 2 respectively.

7. Click Continue.

61f273b10d50e.png

The connection has been established.

Actions

Send a Text Message

Sends SMS to the selected number.

Sender Enter the sender's name that appears to the receiver when they receive the message.
Receiver Enter the phone number of the receiver to whom you want to the text message. You can add multiple phone numbers separated by a comma.
Message Enter the message content.

Send a Voice Message

Converts text to voice and send it to the selected receiver.

Receiver Enter the recipient's number to whom you are sending the voice message.
Message Enter the voice-message content.
Language Select the language in which you want to send the voice message.

Get a Balance

Checks your account credit balance.

Make an API Call

Performs an arbitrary authorized API call.

URL

Enter a path relative to https://rest.moceanapi.com/rest. For example, /account/balance

For the list of available endpoints, refer to the Mocean API Documentation.

Method

Select the HTTP method you want to use:

GET to retrieve information for an entry.

POST to create a new entry.

PUT to update/replace an existing entry.

PATCH to make a partial entry update.

DELETE to delete an entry.

Query String

Enter the request query string.

Body

Enter the body content for your API call.

Example of Use - Get Account Balance

The following API call returns the account balance from your Mocean account:

URL: /account/balance

Method: GET

61f273b2321f0.png

The result can be found in the module's Output under Bundle > Body. In our example, the account balance of the current user is returned:

61f273b3300e6.png
GET

61f273b2321f0.png

The result can be found in the module's Output under Bundle > Body. In our example, the account balance of the current user is returned:

61f273b3300e6.png