Clearing metadata

Hi Team,

We are adding some meta data via actions. So we endup adding some additional meta-data which are not required. But the meta data is persists in the user profile, even though I have removed the code in action. Is there any configuration or approach to force to clear the stored user profile and let the actions re-create the profile again while login.

Due to this un-wanted additional fields in the user profile I am getting “The generated token is too large. Try with more specific scopes.”

Thanks!

Hey there @ganesh.kumaresan

You need to do an update where the fields in the metadata you want to remove have null as value.

So, for example doing a PATCH with "user_metadata": {"attribute_name": null}, will remove the field attribute_name from the user metadata.

Additionally, in Actions you can use the api object to both set userMetadata and appMetadata:
api.user.setUserMetadata("attribute_name", null);
or
api.user.setAppMetadata("attribute_name", null);


Check this out for more information:

Please let me know if you have any further questions.

Thanks,
Timotei

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.