Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

403 error if page is private, but post is still made #22

@pieartsy

Description

@pieartsy

I get an exception and 403 error saying "Something went wrong." if I try to post to a private page, but the post still is made and visible on the cohost site.

from cohost.models.user import User
from cohost.models.block import AttachmentBlock, MarkdownBlock

import os
user = User.login(os.getenv("COHOST_USER"), os.getenv("COHOST_PASS"))
project = user.getProject('myPage')

blocks=[MarkdownBlock('test')]

newPost = project.post(headline="test", blocks=blocks) # this is where the exception is raised

print('Check out your post at {}'.format(newPost.url))

image

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingno reproductionNo current reproduction of this issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions