I’m totally new to APIs in general only have some php experience.
I just basicly need a button to login via twitch and then I can read their username.
This isn’t secure information so there isn’t a token needed.
But as far as I understand correctly, I have to do it anyways to get a token and then get the username.
My problem is twitch spits out
"error": "Bad Request",
"message": "client does not exist"
I used this url out of a tutorial
clientid is obviously my Application ID that I have censored
And here is the tutorial I was following
Any help would be really cool!
Hey, remove the
 brackets from the URL.
Thanks just a quick 2nd question.
The token appears in the url after you get redirected can I use that token in the URL?
I have it in php with the function
but the offical API documentation says I need to use
But I don’t know how to use this “post”
You will need to make the POST request as specified in the Authentication doc. For background you can read about POST here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html . Essentially it is the method data is sent from forms on websites to the server.
I did a quick google search for sending a POST request from PHP and found: https://stackoverflow.com/questions/5647461/how-do-i-send-a-post-request-with-php
If you are using a framework, I would suggest looking into a more specific way to do it from within that framework as it may be cleaner and in better practice.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.