get_page_by_id retun html instead json with metadata Confluence Python API

Question:

I try to get meta data from confluenca, but receives html from the login page.

    confluence = Confluence(
            url=URL,
            username=settings.LOGIN['username'],
            password=settings.LOGIN['password']
        )

    metadata = confluence.get_page_by_id(self.ID, 'version,body.view', status=None, verion=None)

Return:

<!DOCTYPE html>
<html dir="ltr" class="" lang="en">
<head>
    <title>Sign in to your account</title>
...

It worked properly before, I don’t know why it doesn’t work now.

Thanks.

Asked By: Fia1990

||

Answers:

It looks like confluence having trouble logging in, make sure you’re connected to the company’s VPN and still have the company’s security up to date.

Answered By: Szymon Cogiel
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.