Skip to content

Instantly share code, notes, and snippets.

@AndrewBelt AndrewBelt/cat.sh

Created Mar 13, 2015
Embed
What would you like to do?
Change your GroupMe profile picture to a random picture of a cat every time you run this script
# Insert account info here
# Access token can be found by opening the Web Inspector console of Chrome or Firefox and looking for the key following "access_token"
# User ID can be found in the console inside the URL that looks like "/user/XXXXXXXX"
ACCESS_TOKEN=''
USER_ID=''
JSON_PAYLOAD='{"user":{"image_url":"http://thecatapi.com/api/images/get","avatar_url":"http://thecatapi.com/api/images/get"}}'
curl "https://v2.groupme.com/users/$USER_ID" --request POST -v \
-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Accept-Language: en-US,en;q=0.5' --compressed \
-H 'DNT: 1' \
-H "X-Access-Token: $ACCESS_TOKEN" \
-H 'Referer: https://app.groupme.com/profile' \
-H 'Origin: https://app.groupme.com' \
-H 'Connection: keep-alive' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json;charset=utf-8' \
--data $JSON_PAYLOAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.