Hey there, so I am trying to create a Discord bot that has a patreon webhook. I want my webhook to post a message in some channel on pledge:create and :pledge:delete. So far, so good. My code works up to there.
However, I want to be able to ping the user’s discord account, if they have it linked. I don’t really want to include real names, as that might evade privacy. In that case, just using the webhook, how can I get the user’s discord ID? The webhook returns a JSON, and maybe its something like: data[attributes][social_connections][discord_id]? I made a test payment to see where it is in the JSON, but I was unable to find it. Any help is much appreciated!
If the webhook is not already providing it, no. As an alternative you can use a singular call to get both identity and patronage info like WP plugin is using:
You should be able to request additional info about the patron profile via includes.