Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alphagamer7 opened this issue Apr 30, 2019 · 6 comments
Open

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

alphagamer7 opened this issue Apr 30, 2019 · 6 comments

Comments

@alphagamer7
Copy link

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;
@alphagamer7 alphagamer7 changed the title invalid response as you are being redirected to login page invalid response as "you are being redirected to login page" Apr 30, 2019
@wangxingxing123654
Copy link

there is nobody answer u

@philspitler
Copy link
Contributor

I'm getting the exact same thing. Is there a solution to this?

@kojuka
Copy link

kojuka commented Oct 17, 2020

@wangxingxing123654 @philspitler @alphagamer7 I'm getting this as well. you guys find an answer to this?

@willyou
Copy link

willyou commented Apr 6, 2021

same here..

@joshwayman
Copy link

Also getting this error...

@evanrooijen
Copy link

The authorize method initiates a POST request which should include an Accept header with application/json but it doesn't

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants