Skip to content

Instantly share code, notes, and snippets.

@einzige
Last active August 10, 2021 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save einzige/05edb25b4e200a054f95efc61410b3fc to your computer and use it in GitHub Desktop.
Save einzige/05edb25b4e200a054f95efc61410b3fc to your computer and use it in GitHub Desktop.
Subscribestar API CURL example
# First open the following URL:
# https://www.subscribestar.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URL&response_type=code&scope=ONE_OR_MULTIPLE_SCOPES
# You can use "Authorization sample" provided in a related section of Profile Page Settings.
# Upon redirect to your REDIRECT_URL you will be given with a `code` request variable, eg https://localhost:3000/?code=T**************************HSS.
# Use the `code` parameter in the following CURL request:
curl --request POST --url "https://www.subscribestar.com/oauth2/token?grant_type=authorization_code&code=****&client_secret=****&client_id=****&redirect_uri=****"
# Now you received a response with a token.
# Token is used in Bearer header to make API calls:
curl --request POST --url "https://www.subscribestar.com/api/graphql/v1" --header 'Authorization: Bearer TOKEN_RECEIVED_ON_PREVIOUS_STEP' --data '{"query":"{ subscriber { name } }"}' -H "Content-Type: application/json"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment