3

I was thinking is there any way I can log into my stackoverflow.com account through my python code.

Is there any stackoverflow-pythonAPI through which I can achieve the above task.

I googled before asking here but was not able to find any API nor any Hello World example of using it with python.

3
  • What exactly do you mean by "logging in"? Does this mean you want to tell your browser to log in? Or do you want to access non-public profile information prgramatically? Commented Aug 6, 2012 at 11:52
  • I want to access non-public profile information. Commented Aug 6, 2012 at 11:53
  • @Wooble: Really? I did not find any solution yet. Commented Aug 6, 2012 at 12:16

1 Answer 1

5

You're in luck: there is both an API and there is are at least two python libraries (Py-StackExchange and Stack.PY) to use that API.

One caveat: Personal information requires that you use the v2.0 API, but the currently released version of Py-StackExchange only supports up to version 1.1. The GitHub repository for the library has a updating-2.0 branch that may or may not work for you. Stack.PY does support version 2.0 (and 2.1 too!).

The API itself is based on HTTP requests with JSON responses, so you could just call the API directly as well.

Sign up to request clarification or add additional context in comments.

6 Comments

Do you have an idea how to authenticate using this library, or if this is even possible?
I vaguely remember that access to the private information is only possible with version 2.0 of the API, and this library only support version 1.1, so I have some doubts this answers the question.
@SvenMarnach: Ah, you are correct: Announcing API version 1.1
The github repo for this library has an "updating-2.0" branch for v.2 of the API, although I haven't confirmed that it actually works.
@MartijnPieters: But I cannot access the non-public profile information becuase it seems I cannot authenticate myself.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.