Hey i'mI'm trying to post an article using StackExchange's Teams apiAPI then try to pull that new article's id from the apiAPI response. The article gets posted but the items field is empty :
{"items":[], "has_more":false,"quota_max":10000,"quota_remaining":9999"}
thisThis is weird because the docs state that the request is supposed to return an article block https://api.stackexchange.com/docs/create-article
whatWhat am iI doing wrong? here'sHere's my code (in Python):
import requests
base_url = "https://api.stackexchange.com/"
payload = {'title' : title, 'body' : body, 'article_type' : article_type, 'tags' : tags, 'key' : key, 'site' : 'stackoverflow', 'team' : team}
r = requests.post(base_url + "2.3/articles/add", headers = {"X-API-Access-Token" : access_token}, data = payload)
print(r.text)
Note that i'veI've hidden only the variables iI pass to the payload dictionary. butBut those variables are correct because as iI said, the article gets posted successfully.
iI tried adding {"filter" : "default"}
to the payload but iI get the same response.