Skip to content

Instantly share code, notes, and snippets.

@einzige
Last active Aug 10, 2021
Embed
What would you like to do?
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