Search code examples
pythonjsonmetadataconfluence

get_page_by_id retun html instead json with metadata Confluence Python API


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.


Solution

  • 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.