0

Trying to authenticate with the snapchat API through CURL and I"m not sure what I'm doing wrong. I have tried the following:

curl -X GET \
-H "client_id={}" \  
-H "redirect_url={}" \
-H "response_type=code" \
-H "scope=snapchat-marketing-api" \
https://accounts.snapchat.com/login/oauth2/authorize

through my terminal and I'm getting the following error:

curl: (3) URL using bad/illegal format or missing URL
zsh: command not found: -H

I'm fairly new to this so would appreciate any guidance. I was expecting to be redirected into a browser to authenticate and would be given a temp access token or refresh token

ben890
  • 1,097
  • 5
  • 25
  • 56

1 Answers1

1

As per Snapchat documentation, you can actually pull the code by turning the request into a URL and the code will be displayed in the browser/address bar at the end of the redirect link after you authorise the app.

take bellow URL and fill in your details as required and follow it via your browser:

  # Sample URL to redirect the OAuth users to - Single Scope
  https://accounts.snapchat.com/login/oauth2/authorize
  ?client_id=4cxxxx8-1c33-xxxx-8798-xxxxxxxx
  &redirect_uri=https://test.animalfarm.com/callback
  &response_type=code
  &scope=snapchat-marketing-api
ibimon
  • 147
  • 7