I would like to create a small application just for me to log in to Stack Overflow and see my profile.

The issue is that if I understand the documentation correctly, I have to first approve my application for myself (optionally provide username/password if not logged in yet) and then every time I want to do something authenticated I have to go for access token to https://stackoverflow.com/oauth/access_token where I have to provide my username and password in case I am not logged in.

Can this step be done automatically using REST API? So I don't have to manually pass username and password to the webpage?

I would like to provide username/password to my app (I have already approved my application in my profile) and then it would just post my username/password to verify that I have approved my app and get token automatically.

Is this possible?

| improve this question | | | | |
  • 1
    As explained here you can request an access_token with the scope no_expiry. That should give you an access_token that you can use indefinitely. – rene Jul 13 '18 at 8:29
  • @rene so does that mean that otherwise after approving app and getting a token with expiration 1 hour I would have to retype username/password to obtain a new token? – Xenon Jul 13 '18 at 9:27
  • If the token is expired your users have to re-authenticate, yes. – rene Jul 13 '18 at 9:44
  • Shouldn't this question be at Stack Apps? – ale Jul 13 '18 at 14:47

You must log in to answer this question.

Browse other questions tagged .