Skip to content

A Java module for communicating with Nimba SMS API.

License

Notifications You must be signed in to change notification settings

hadpro24/nimbasms-java

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nimbasms-java

A Java module for communicating with Nimba SMS API.

Usage

First, instantiate the client using your API key:

NimbaSmsClient client = new NimbaSmsClient("ACCOUNT_SID", "AUTH_TOKEN")

Accounts

Retrieve the account information using the getAccount() method:

AccountResponse accountResponse = client.getAccount().get();
System.out.println(accountResponse);

Sender Names

Retrieve the sender names using the getSenderName() method:

RootResult<SenderNameResponse> senderNameResponse = client.getSenderName().list();
System.out.println(senderNameResponse);

You can also retrieve the last 10 sender names by passing in the limit and offset:

RootResult<SenderNameResponse> last10SenderNameResponse = client.getSenderName().list(10, 1);
System.out.println(last10SenderNameResponse);

Contacts

This code retrieves a list of all contacts.

RootResult<ContactResponse> contacts = client.getContact().list();
System.out.println(contacts);

You can also retrieve the last 10 contacts by passing in the limit and offset:

RootResult<ContactResponse> last10contacts = client.getContact().list(10, 1);
System.out.println(last10contacts);

Create Contact. This contact will be added to the default contact list:

ContactResponse defaultContactResponse = client.getContact().create("+224XXXXXXXXX", null, null);
System.out.println(defaultContactResponse)

Groups

This code retrieves a list of all groups.

RootResult<GroupResponse> groups = client.getGroup().list();
System.out.println(groups);

You can also retrieve the last 10 Group by passing in the limit and offset:

RootResult<GroupResponse> last10groups = client.getGroup().list(10, 1);
System.out.println(last10groups);

About

A Java module for communicating with Nimba SMS API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%