By following this Stack Exchange API documentation, I have registered my application on Stack Apps (here). After registering I got my request key
and access_tokens
created via authentication.
I need to run the Stack Exchange API via curl command, for that, I ran the following command
curl "https://api.stackexchange.com/2.2/answers/43919322?order=desc&sort=activity&site=stackoverflow&access_token=my-access-token)EuzzA((&key=5RseNTJmS0C35DTMsc2dYQ((" | gunzip
After hitting the above request, I get the following error :
{"error_id":403,"error_message":"`key` is not valid for passed `access_token`, token not found.","error_name":"access_denied"}
For authentication, I referred this and hit the URL https://stackoverflow.com/oauth/dialog
with query string parameters, but here also no response is shown.
Can anyone please tell me why this error is coming, even though the parameters mentioned in the curl request are correct OR is there any step left for authentication?