Hi all¡
I am having a 403 response when a Python code tries to create a child page in Confluence.
We are using the following Python code that runs daily in Jenikns at 7.15 that creates a child page with our daily tasks so the team can tick them.
page_date = date.today().strftime("%Y-%m-%d")
due_date = page_date
page_title = 'operations_daily_tasks_'+ page_date
space_key = 'TO'
ancestor_id = 7475431
task_list = [
{"task_id": "1",
"task_text": "Download List of Shorts from Matrix - See: ",
"task_link": '"https://cygnus-am.atlassian.net/wiki/spaces/OP/pages/46628871/Locates+Request+MS"',
"task_link_text": "Procedure",
"task_due_date": due_date,
"task_user_id": users['borja']
},
{"task_id": "2",
"task_text": "Check the Web Portal - See: ",
"task_link": '"https://cygnus-am.atlassian.net/wiki/spaces/OP/pages/1078853868/Check+the+Web+portal"',
"task_link_text": "Procedure",
"task_due_date": due_date,
"task_user_id": users['borja']
},
page_data = create_task(page_title, space_key, ancestor_id, task_list)
r = requests.post('https://cygnus-am.atlassian.net/wiki/rest/api/content',
data=json.dumps(page_data),
auth=('admin', 'THE PASSWORD'),
headers=({'Content-Type':'application/json'}))
I have checked that the problem is not coming from space key, ancestor id neither task_list.
I think it is related with auth. This code was created by I worker that left the company.
Please note I am Admin in Confluence and I have permissions for creating, editing and deleting in any space.
Any help is appreciated as I am desperate to have this issue solved.