Skip to content

Commit a0fdd2b

Browse files
author
Mark Lewin
authored
Merge pull request #33 from Nexmo/account-examples
Add examples for Account
2 parents cb6d54e + c87ca89 commit a0fdd2b

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

account/account-balance.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
source "../config.sh"
3+
4+
curl "https://rest.nexmo.com/account/get-balance?api_key=$NEXMO_API_KEY&api_secret=$NEXMO_API_SECRET"
5+
6+

account/configure-account.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
source "../config.sh"
3+
4+
curl -X POST "https://rest.nexmo.com/account/settings?api_key=$NEXMO_API_KEY&api_secret=$NEXMO_API_SECRET" \
5+
-d moCallBackUrl=$SMS_CALLBACK_URL
6+
7+

config.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ ACCOUNT_ID=${ACCOUNT_ID:-""} # For APIs that allow you to access the resources o
2626

2727
# Account API
2828
SECRET_ID=${SECRET_ID:-""}
29+
SMS_CALLBACK_URL=${SMS_CALLBACK_URL:-""}
2930

3031
# Audit API
3132
EVENT_UUID=${EVENT_UUID:-""} # UUID of audit event

0 commit comments

Comments
 (0)