Removing Integration Associations from Content
Problem
You want to remove the association between an integration and a content item.
Solution
Get a content item, then use the content item’s oauth.associations.delete()
method to delete the association.
from posit import connect
= "a080baef-854e-411f-ac3c-d2bc47bcb109"
GUID
= connect.Client()
client = client.content.get(GUID)
content content.oauth.associations.delete()
Get the content item’s guid, then use the connectapi
client to make a direct call to the associations endpoint using an empty list.
library(connectapi)
<- "a080baef-854e-411f-ac3c-d2bc47bcb109"
GUID
<- connect()
client $PUT(paste0("v1/content/", GUID, "/oauth/integrations/associations"), body = "[]") client
Discussion
To confirm that the association was deleted follow the Finding Integrations Associated to Content recipe.
See also
- For more details about the data returned in this recipe, see Set all OAuth integration associations in the API Reference.
- See OAuth Integrations in the User Guide to learn more about how publishers and viewers interact with OAuth integrations.
- See OAuth Integrations in the Admin Guide to for more detailed information on how to configure OAuth integrations.