-12

Assume I have created a product/library and I want to provide help whenever there is a related question about my product on Stack Overflow. Let's also assume that I have created a super smart service which can provide decent answers to Stack Overflow questions.

My question: Is it possible to integrate my service to Stack Overflow and have it provide an initial answer to a newly posted question?

2
  • 12
    Please do not do that. How will your software identify duplicates? What about editing the question into shape? What about comments? Please don't write automated answers. It's likely such account would get suspended.
    – Dharman Mod
    Oct 6, 2022 at 20:55
  • 3
    Doomed to fail...: Having posted/asked your Question on 'SO' ('Main') rather than on 'Meta' (while having 1.5k-Rep) already hints at that you don't know the Functioning of the Site very well, I would think...
    – chivracq
    Oct 6, 2022 at 22:21

3 Answers 3

-8

PART 1: Get all the questions regarding your product/library on StackOverflow.

Solution: Use Stack Exchange Search Endpoint (https://api.stackexchange.com/docs/search).

In the "intitle" input, add your product's name (ex: react), sort ascending by activity, select date range (ex: from sep 1 to sep 30), page size (ex: 100, gives 100 matches (if applicable)).\

For the conditions above, the Endpoint is something like https://api.stackexchange.com/2.3/search?fromdate=1661990400&todate=1664496000&order=asc&sort=activity&intitle=react&site=stackoverflow

You will get the response in JSON Format which will include the links and question_id to post in which your product is mentioned (that is the "intitle" field set above).

PART 2: Answer the question fetched In previous step (Login-Required)

To answer the question, use the Create Answer Endpoint (https://api.stackexchange.com/docs/create-answer).

Input the question_id, answer (body), auth_key, token and send the request and the question will be posted (you'll get token and auth_key after logging-in).

Service Architecture

Fetch StackOverflow questions regarding your product from StackExchange-Search Endpoint, use your super smart service to answer the question, send the answer to StackExchange-Create Endpoint.

MORE Resources

StackExchange API Docs: https://api.stackexchange.com/docs/ and
StackOverflow Teams Integrations: https://stackoverflow.co/teams/integrations/

4
  • The super smart service should also check if 1) the question is actually on-topic, and 2) if the question has already been asked and answered before. In both cases, flag/close as off-topic or as duplicate. Oct 6, 2022 at 21:46
  • Some guys on this site are just over-possessive for this site. Technically, this answer is totally (100%) correct. I had no intent to pollute this site. Also, you're seeing, my reputation is 55 (on this site) which probably means I lack experience using this site. I had no idea that there are some specfic sub-sites to ask questions regarding this site specifically. I thought only technical questions are answered. The downvotes to this answer were unnecessary. You could've told me in the comments. Now, I can't even delete this answer after its accepted (strage stackoverflow things)
    – user15946403
    Oct 6, 2022 at 23:13
  • 4
    @RTX - Downvotes on meta have no consequences (to your reputation or otherwise). Even correct answers can have unintended side effects that make them less useful. Oct 6, 2022 at 23:40
  • 2
    Worth mentioning that on Stack Apps questions about the use of the Stack Exchange API are on topic. We also have an FAQ
    – rene
    Oct 7, 2022 at 5:00
9

This only makes sense if you want to treat Stack Overflow as some kind of support desk or service center for people getting help with your software.

Stack Overflow is firmly not that kind of place.

3

If there are some specific questions which you think you can provide good answers to, and those questions do not already exist on Stack Overflow, and they are on topic, then probably the best thing you could do to contribute to Stack Overflow would be to ask and self-answer those questions. People who later have the same questions should be able to find your answers by searching.

I suggest your efforts would be far better spent writing such answers yourself, rather than trying to develop an algorithm which can generate appropriate answers. The chances are, any automated answering algorithm is going to produce bad answers which miss the point of questions, or repetitive answers to duplicate questions which ought to be closed instead of answered, or both. The best case scenario is that your algorithm produces answers that are as good as you could have written yourself, but you spent so long making it work that well that you ought to have just written the answers yourself instead. And to be clear, I don't think that scenario is at all likely.


As Makyen notes in the comments, you would need to make sure you are doing this to provide answers to genuinely useful questions, not just to promote your product/service; and Stack Overflow's policy requires you to disclose your affiliation when you write a question or answer about your own product/service.

2
  • 1
    We typically treat seeding such self-answered questions about your own product as promotion/spam. It may be possible to do it in a manner which isn't seen as spam, but I have yet to see it done in a manner which doesn't look like promotion. At an absolute minimum, disclosure of affiliation would be required in both the question and answer. Substantial care would also need to be taken that the Q&A is actually on-topic. [Note: I'm not talking about just a self-answered question about something the person is using, but specifically about a person or company seeding questions about their thing.]
    – Makyen Mod
    Oct 6, 2022 at 22:02
  • @Makyen Good points, indeed.
    – kaya3
    Oct 6, 2022 at 22:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .