Skip to content

invalid response as "you are being redirected to login page" #67

@alphagamer7

Description

@alphagamer7

Hi,
I would like to know why I am getting the response as
<html><body>You are being <a href="https://login.bigcommerce.com/login">redirected</a>.</body></html> when I should have got an example data object as mentioned in the documentation.
Here is my code snippet.

var app = express();
BigCommerce = require('node-bigcommerce');

const bigCommerce = new BigCommerce({
  logLevel: 'info',
  clientId: '(Removed for obvious reasons)',
  secret: '(Removed for obvious reasons)',
  callback: 'https://priyanamdtest.mybigcommerce.com',
  responseType: 'json',
  apiVersion: 'v3' 
});

app.get('/auth', function(req, res, next) {
  bigCommerce
    .authorize(req.query)
    .then(data => res.write(data))
    .catch(next);
});

var port = process.env.PORT || 8080;
app.listen(port);

module.exports = app;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions