https://github.com/moceanapi/mocean-grails-sms
This plugin serve outbound SMS
https://github.com/moceanapi/mocean-grails-sms
Last synced: 6 months ago
JSON representation
This plugin serve outbound SMS
- Host: GitHub
- URL: https://github.com/moceanapi/mocean-grails-sms
- Owner: MoceanAPI
- Created: 2020-04-17T07:38:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-26T09:26:40.000Z (over 3 years ago)
- Last Synced: 2025-06-08T11:47:03.079Z (7 months ago)
- Language: Groovy
- Size: 70.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Mocean SMS Grails Plugin
=
## Description
This plugin provide sending SMS capability to grails framework for user using [MoceanAPI](https://moceanapi.com) service
Try for FREE now. 20 trial SMS credits will be given upon [registration](https://dashboard.moceanapi.com/register?fr=grails). Additional SMS credits can be requested and is subject to approval by MoceanAPI
## Configuration
Add your credentials to your application.yml like sample below.
```yaml
moceanapi:
api_key: YOUR_MOCEAN_API_KEY
api_secret: YOUR_MOCEAN_API_SECRET
```
Add dependencies
~~~
dependencies {
...
compile "org.grails.plugins:mocean-grails-sms:0.0.1"
}
~~~
Add repo
~~~
repositories {
...
maven { url "http://dl.bintray.com/moceanapi/plugins" }
}
~~~
## Usage
#### Normal:
If you only need send SMS can follow the sample below.
~~~java
import com.moceanapi.sms.SmsService
class Testing {
def SmsService
def index() {
def from = "SENDER_NUMBER"
def to = "RECEIVER_NUMBER"
def text = "MESSAGE_BODY"
Map response = SmsService.send(from, to, text)
}
}
~~~
#### Advance:
If you wish to have more configuration options to your SMS. Please visit our [API docs](https://moceanapi.com/docs/#send-sms) to find out more parameters
~~~java
import com.moceanapi.sms.SmsService
class Testing {
def SmsService
def index() {
Map map = ["mocean-from": "SENDER", "mocean-to": "RECEIVER", "mocean-text": "MESSAGE_BODY"]
Map response = SmsService.send(map)
}
}
~~~