Getting Discord UserIDs of pledge users

Hey there, I’m currently working on a discord bot that I was hoping to add patreon rewards into.

so far I have managed to connect to the API and grabbed the pledge data of my patreon campaign however when getting the user data of those pledges the discord user IDs are not available.

I can see all of the other information about the users except for the data I need to be able to hook the users into my discord bot.

I know that the users I am getting with the API have discord accounts linked to their patreon accounts as they currently are receiving patreon rewards on my discord server.

could this be an issue with how I’m getting the data or could it be an API issue?

1 Like

nevermind, it appears that i was trying to grab the wrong id

image
looks like I was able to get all of the data properly, I don’t know how to close a thread soooo yeah.

1 Like

No worries @DawnFelstar. Would love to know more about what you’re working on - is it for you as a creator, or for many creators to use (even in the future)? Really excited to see more and more discord integrations using our API beyond what we can ever hope to do ourselves.

Im working on a multi-purpose discord bot and basically what i wanted was to get a list of discord userids of my patrons who were helping support my bot so i could give some perks to them. It was a pretty simple thing to do once i got access to the api properly.

1 Like

It’s great that the social connections are in the api response. I’m just curious whether this is smart to do with GDPR incoming, how does this hold up that people social profile information is shared like this? Is consent implicit?

I highly suggest to avoid the discord_id attribute on the user resource and to use social_connections.discord instead.

Thank lira, yeah that’s how i solved my issue.

Agreed - our team is prioritizing doing a lot more to clarify to everyone using our API what information is being shared. This would not just be good for creators and patrons, but also for developers.

And yeah. We should err on explicit permissions. This needs to improve on our end.

Hello may i ask what code you did to get the ids since im not really good at the patreon api and i dont get the docs very well. I dont know what do you use but i use Python

You may try the current_user call:

https://docs.patreon.com/#fetching-a-patron-39-s-profile-info