Hi, I need direction to setup nodejs with clovers api. I want to get order amounts by searching a order id. I don't have a developer account since I am not trying to make an app. I just want the simple function to get an order amount by searching a order id through the api. It seems the clover docs only cover developers making apps. I tryed using passport but I dont know what to put into the authorization url since I dont have a client id only a merchant id. I also dont know what to put into the tokenURL im guessing I can get req.header for the AUTHORIZATION_CODE?
const express = require('express') const app = express() const passport = require('passport') const OAuth2Strategy = require('passport-oauth2').Strategy; passport.use(new OAuth2Strategy({ authorizationURL: 'https://www.clover.com/oauth/authorize?client_id={appId}&redirect_uri={CLIENT_REDIRECT_URL}', tokenURL: 'https://www.example.com/oauth_callback?merchant_id={mId}&employee_id={employeeId}&client_id={appId}&code={AUTHORIZATION_CODE}', clientID: EXAMPLE_CLIENT_ID, clientSecret: EXAMPLE_CLIENT_SECRET, callbackURL: "http://localhost:3000/success" }, function(accessToken, refreshToken, profile, cb) { User.findOrCreate({ exampleId: profile.id }, function (err, user) { return cb(err, user); }); } )); app.get('/auth/example', passport.authenticate('oauth2')); app.get('/auth/example/callback', passport.authenticate('oauth2', { failureRedirect: '/login' }), function(req, res) { // Successful authentication, redirect home. res.redirect('/'); });