I am working on a project and want to get questions from stack overflow using Stack Overflow API. I searched the way how to achieve the same here:
- how to get a list of questions from stackoverflow API based on search query?
- Getting null as response from Stack Overflow API with PHP
- How to use Stack Overflow API in PHP
But I found nothing useful as they are old techniques. They are using old Stack Overflow API versions.
While going through stackapps I read that to achieve this task I have to register my app. I have registered an app on www.stackapps.com. and I got an APP ID and its SECRET KEY.
I visited here https://api.stackexchange.com/docs/authentication to know how to get data from stack API V 2.2. They have given useful links to get data using Stack Overflow API V 2.0 using authentication via OAuth 2.0
It says ask for a request from user and then get "code" etc. I got stuck here. What should be the process in order to move forward using PHP.
My app should do this:
Let input link be : https://api.stackexchange.com/2.2/questions?order=desc&sort=activity&site=stackoverflow
I get data of this page in any of the two form either HTML or JSON.
Can it be done without OAuth. If not, then please guide.