I'm trying to post an article using StackExchange's Teams API then try to pull that new article's id from the API response. The article gets posted but the items field is empty :
{"items":[], "has_more":false,"quota_max":10000,"quota_remaining":9999"}
This is weird because the docs state that the request is supposed to return an article block https://api.stackexchange.com/docs/create-article
What am I doing wrong? Here'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've hidden only the variables I pass to the payload dictionary. But those variables are correct because as I said, the article gets posted successfully.
I tried adding {"filter" : "default"}
to the payload but I get the same response.