Meteor and Patreon API


How can I make use of the Patreon API from my meteor app?
Can you please guide on how to do this?


You can use the Patreon API from meteor with the patreon package on npm.

The documentation for using the Patreon API is here:

Without a more specific question on what you are trying to do, what you have tried so far, and what issue you are encountering, I can’t help any further than pointing to the official resources

Thanks for the reply.
I have a link labeled “Link your Patreon account” that goes to an url like this:

I am using Flow router that doesn’t support server routes.

How do I read the code query param when Patreon redirects back to my Meteor app?

Then I have to call an http api via POST method,
How is this done with Meteor? axios? fetch?

Thanks for your reply, you’ve saved me a couple of time in the past.


Would the webapp package be useful for this? It will run from the server and accept the incoming request before it passes it on.

See the example url:

// Listen to incoming HTTP requests (can only be used on the server).
WebApp.connectHandlers.use('/hello', (req, res, next) => {
  res.end(`Hello world from: ${Meteor.release}`);

Then your url could be something like (instead of /hello it’d be something like /patreon-callback-uri or whatever you tell Patreon what your calback uri is )

Then you’d read the query params from the req object.

I think that should work.

1 Like

Thanks for your reply.
After reading the query param the req object and saving it to the user collection
I would have to do a redirect to a route define with Flow router?
How do I exec a POST call with the code query param from there?

You’d do a‘post’, with your post payload) or (with your post payload) within the connectHandler, and do a res.end() to tell Patreon you’ve received the info, then call next() - that should send the request onto the client, which your route can then pick up.

I think (hope!) that’s the way it works - give it a whirl!

edit: I’m going to look like a damn fool if it doesn’t. :wink: