I just started learning angularjs and i'm trying to get a token from an api. The curl command I have works fine when I use it in the terminal and can get the token just fine. I am having a hard time making it work using $http though.
Here's my cURL command:
curl --data "grant_type=authorization_code&client_id=CLIENT_ID&client_secret=SECRET_KEY&redirect_uri=http://localhost:9999&code=AUTH_CODE" https://www.twitchalerts.com/api/v1.0/token
Can anyone help me convert this using $http
$httpcode tried. What does your error handler tell you? What do you see in browser console when try to make request?