Skip to content

Instantly share code, notes, and snippets.

@illarionvk
Last active October 7, 2021 07:08
Show Gist options
  • Save illarionvk/e4e0c8d53d1f8b85234b960fef2c2a83 to your computer and use it in GitHub Desktop.
Save illarionvk/e4e0c8d53d1f8b85234b960fef2c2a83 to your computer and use it in GitHub Desktop.
ReCharge API Curl requests
#! /bin/bash
set -euxo pipefail
TOKEN=INSERT_YOUR_TOKEN
# Get subscription count
curl -i -H "X-Recharge-Access-Token: ${TOKEN}" \
-X GET 'https://api.rechargeapps.com/subscriptions/count?created_at_min=2017-09-01T00:00:00'
# Get third page of the results
curl -H "X-Recharge-Access-Token: ${TOKEN}" \
-X GET 'https://api.rechargeapps.com/subscriptions?created_at_min=2017-09-01T00:00:00&limit=5&page=3'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment