Patreon.js library error

var url = require(‘url’)
var patreon = require(‘patreon’)
var patreonAPI = patreon.patreon
var patreonOAuth = patreon.oauth

// Use the client id and secret you received when setting up your OAuth account
var CLIENT_ID = ‘pppp’
var CLIENT_SECRET = ‘pppp’
var patreonOAuthClient = patreonOAuth(CLIENT_ID, CLIENT_SECRET)`

Using the example code with the correct CLIENT_ID and CLIENT_SECRET, results in the last line of the above code erroring, with the following error:

var patreonOAuthClient = patreonOAuth(CLIENT_ID, CLIENT_SECRET); TypeError: patreonOAuth is not a function

According to the documentation, and the example therein, that should be a function, yet it isn’t. Can anyone shed some light on why this isn’t working as the documentation says it should? I’m getting desparate here.

1 Like

I guess it is better if you submit this problem here https://www.patreondevelopers.com/ since there seems to be more specialized on technical issues…