BadRequest: Only own properties can be set

Hi, I'm busy integrating a subscription addon with a payment gateway and decided to user member properties to store member data. In the gateway ITN callback I would like to store the fact the the member has successfully paid their subscription but when I try I use setProperties I get

Blockquote zExceptions.BadRequest: zExceptions.BadRequest: Only own properties can be set.

I cannot sign the member in at the point because I don't have their password. Any ideas how to override this or should I rather store their data elsewhere?

You do not have the permission to modify the properties. Use plone.api.env.adopt_roles context manager to execute the line with elevated permissions. Environment — Plone Documentation v5.2

Do not forget to also allow the request to write to the DB - I assume you have no CSRF token provided.

Oh cool! Thanks @jensens, I didn't know about this.