Skip to content

Instantly share code, notes, and snippets.

@acapps
acapps / curl-message-get
Last active March 24, 2016 20:42
Zipwhip - message/get
GET /message/get HTTP/1.1
HTTP: api.zipwhip.com
Parameters:
session={session}
uuid={Message ID}
$curl https://api.zipwhip.com/message/get
-d session=[sessionKey]
–d uuid=[id]
@acapps
acapps / curl-creating-altering-webhooks
Last active August 29, 2015 14:01
Example cURL statements for enrolling accounts into Zipwhip Web Hooks.
When installing Web Hooks the first step is to call app/install. One of the return values is the installedAppId. You can store this value, so you can make changes to your Web Hooks in the future. You can however, just use app/list and then snag the installedAppId from the payload.
INSTALL:
NOTE: Web calls do not take JSON as a single input. The settings parameter, however, does take JSON as an input.
$curl -X POST https://api.zipwhip.com/app/install
-d appId=4501
-d session=[SessionKey]
-d settings=%7B%22%2Fsignal%2Fmessage%2Freceive%22%3A%22http%3A%2F%2Fhosteddomain.com%2Fmessage%2Freceive%22%7D
@acapps
acapps / curl-user-login-canada
Last active August 29, 2015 14:01
Example cURL statement for user/login with regard to Canadian numbers.
Example of Canadian Number:
$curl https://api.zipwhip.com/user/login
-d username=%2B15555551212
-d password=default
It is important to note that on Canadian numbers that you must put the number into E.164 format.
Standard user/login
$curl https://api.zipwhip.com/user/login
-d username=[phonenumber]
@acapps
acapps / curl-contact-count
Last active August 29, 2015 14:01
Example cURL statement for retrieving contact count for Zipwhip account using contact/list.
$curl http://api.zipwhip.com/contact/list
-d session=[sessionKey]
–d pageSize=1
Where pages is the total number of contacts associated with the account.
In the example below the account has 89 contacts.
Response:
{
"total":1,
@acapps
acapps / js-overwrite-options-menu
Created June 10, 2014 15:46
Customize the Zipwhip Options menu text. Using the option in Zipwhip to link off to your own JavaScript file.
function findByText(_tag, _search, _value)
{
var aTags = document.getElementsByTagName(_tag);
var i = 0;
for (i = 0; i < aTags.length; i++)
{
if (aTags[i].textContent == _search)
{
aTags[i].innerText = _value;
@acapps
acapps / zipwhip-deeplink
Last active August 29, 2015 14:02
Zipwhip supports deeplinking into our portals. The deep link logic works on pages that are hosted within the Zipwhip domain.
@acapps
acapps / curl-vendor-message-send
Created August 22, 2014 15:53
cURL example using Zipwhip's vendor/message/send.
$curl https://vendor.zipwhip.com/message/send
-d vendorKey=[your vendor key]
-d destinationAddress=[recipients phone number]
-d sourceAddress=[the sender's phone number]
-d body=[message body]
@acapps
acapps / keyword-app-install
Created September 11, 2014 21:32
cURL example of installing the Keyword App.
$curl https://api.zipwhip.com/app/install
-d session=[sessionKey]
–d appId=4601
This will add the Keyword option to the webapp.
Response:
{
"success": true,
"response": {
@acapps
acapps / cURL-zipwhip-changePassword
Created October 1, 2014 23:08
Example of doing a password change.
$ curl https://api.zipwhip.com/password/change
-d session=[session]
-d currentPassword=[existingPassword]
-d password=[newDesiredPassword]
Response:
{
"response":"",
"sessions":null,
"success":true
@acapps
acapps / cURL-zipwhip-forgotPassword
Created October 1, 2014 23:15
Example of invoking Zipwhip's forgot password.
curl https://api.zipwhip.com/user/password/forgot
-d mobileNumber=[Phone Number]
Response:
{
"success":true,
"response":null
}