Skip to content

Instantly share code, notes, and snippets.

View acapps's full-sized avatar

Alan Capps acapps

  • Zipwhip
  • Seattle, WA
View GitHub Profile

POST /user/save Http/1.1

Host: https://api.zipwhip.com

Parameters:

session - Required for authentication.

firstName - User's first name.

POST /user/signature/set Http/1.1

Host: https://api.zipwhip.com

Parameters:

session - Required for authentication.

signature - the desired signature.

@acapps
acapps / Main.java
Last active January 16, 2019 20:25
Sending an MMS via Zipwhip's API using Java.
import java.io.*;
import java.nio.file.Files;
import java.util.List;
public class Main {
public static void main(String[] args) {
String charset = "UTF-8";
File uploadFile1 = new File("/Users/alancapps/Desktop/test.jpg");
@acapps
acapps / basic_input_list.sh
Last active July 6, 2016 19:39
Simple BASH script to loop through an input list.
#! /bin/bash
input_list=`cat $1`
for i in $input_list
do
response=$(curl -s -X POST http://exampleurl.com/ -d parameter=$i)
echo $i::$response >> $1.log
done
@acapps
acapps / gist:4e609daa5bed01050c09
Created February 27, 2015 17:01
Sample-SMTP-Payload
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
From: "Desk" <[email protected]>
To: "Cell" <[email protected]>
Subject: "8ef1211f-d9f2-4c81-906f-7d27da5a32f8:309626613"
MIME-Version: 1.0
SGVsbG8gV29ybGQKCkhvdyBhcmUgeW91IHRvZGF5PwoKR29vZCBUaGFua3Mh
@acapps
acapps / cURL-zipwhip-support
Created October 21, 2014 17:34
Zipwhip Support Ticket.
POST /comment/send HTTP/1.1
Host: https://api.zipwhip.com
$curl https://api.zipwhip.com/comment/send \
-d [email protected] \
-d name=[Users name] \
-d topic=I am the subject field. \
-d comment=I am the body of the support request. \
-d portal=[Portal ID] \
@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
}
@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 / 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-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]