Skip to content

Instantly share code, notes, and snippets.

@beaugunderson
Last active December 15, 2015 02:59
Show Gist options
  • Select an option

  • Save beaugunderson/5191261 to your computer and use it in GitHub Desktop.

Select an option

Save beaugunderson/5191261 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Uses httpie: https://github.com/jkbr/httpie
BASE_URL="https://api.singly.com/"
CLIENT_ID=""
CLIENT_SECRET=""
USERNAME=""
PASSWORD=""
http POST "$BASE_URL/auth/password/register/$CLIENT_ID" user="$USERNAME" \
password="$PASSWORD"
http POST "$BASE_URL/auth/password/login/$CLIENT_ID" user="$USERNAME" \
password="$PASSWORD"
http POST "$BASE_URL/auth/password/set/$CLIENT_ID" user="$USERNAME" \
password="$PASSWORD" client_secret="$CLIENT_SECRET"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment