API Data Provider - Online Help

Connecting to Mocean

Using API Key Authentication

Mocean uses API key authentication to control access to the API. To obtain an API Key:

  1. Log in to your Mocean account at https://dashboard.moceanapi.com
  2. Navigate to your account settings or API credentials section
  3. Copy your API Key

After obtaining your API Key, set the following connection properties:

  • AuthScheme: Set this to APIKey.
Set the following in the ProfileSettings connection property:
  • APIKey: Set this to your Mocean API Key. This is transmitted as a Bearer token in the Authorization header.

Example Connection String

Profile=C:\profiles\Mocean.apip;AuthScheme=APIKey;ProfileSettings='APIKey=your_api_key';

Connecting to Mocean

Once the authentication is configured, you can connect to Mocean and query data from any of the available tables such as AccountBalance, AccountPricing, MessageStatus, and NumberLookup.

Available Tables

The Mocean API Profile provides access to the following tables:

  • AccountBalance: Retrieve the current account balance and credit value for the connected Mocean account
  • AccountPricing: Retrieve SMS pricing information per destination country, operator, MCC, and MNC
  • MessageStatus: Query the delivery status of a previously sent SMS message (requires Msgid)
  • NumberLookup: Retrieve mobile number portability and carrier information for a phone number (requires PhoneTo)

Important Notes

  • The Mocean API defaults to XML responses; the profile automatically appends mocean-resp-format=json to all requests.
  • MessageStatus requires a Msgid from a previously sent SMS message returned by the Mocean SMS send API.
  • NumberLookup requires a phone number in international format including country code (e.g. 60123456789 for Malaysia).
  • NumberLookup is a POST request that consumes credits from your account balance.
  • AccountPricing returns one row per destination operator; results may vary based on your account configuration.

Usage Examples

AccountBalance:

SELECT * FROM AccountBalance

AccountPricing:

SELECT * FROM AccountPricing

MessageStatus:

SELECT * FROM MessageStatus WHERE Msgid = 'your_message_id'

NumberLookup:

SELECT * FROM NumberLookup WHERE PhoneTo = '60123456789'

API Documentation

For more information about the Mocean API, see the official Mocean API documentation at https://moceanapi.com/docs.

Connection Properties

The connection string properties are the various options that can be used to establish a connection. This section provides a complete list of the options you can configure in the connection string for this provider.


Property Description
APIKey The API Key for your Mocean account.
AuthScheme The scheme used for authentication. Accepted entries are APIKey or None.
Allowed values are: BASIC, NONE, NTLM, OAUTH, APIKEY, OAUTH_CLIENT

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9655.0