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

Error: The API Key provided is not valid #30

Open
Brandnewson opened this issue Mar 17, 2022 · 3 comments
Open

Error: The API Key provided is not valid #30

Brandnewson opened this issue Mar 17, 2022 · 3 comments

Comments

@Brandnewson
Copy link

Brandnewson commented Mar 17, 2022

``I'm currently attempting a nodeJS project using commonJS modules. Whenever I try to run my server it gives me the following error:

Error: The API key provided is not valid.
at IEXRequest. (D:\Coding\iib\node_modules\node-iex-cloud\lib\request.js:128:31)
at step (D:\Coding\iib\node_modules\node-iex-cloud\lib\request.js:32:23)
at Object.next (D:\Coding\iib\node_modules\node-iex-cloud\lib\request.js:13:53)
at fulfilled (D:\Coding\iib\node_modules\node-iex-cloud\lib\request.js:4:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

This is the code I used to install `node-iex-cloud

`const { IEXCloudClient } = require("node-iex-cloud");
const fetch = require("node-fetch");

const iex_module = new IEXCloudClient(fetch, {
  sandbox: true,
  publishable: "pk_API_KEY",
  version: "stable"
});`
@Brandnewson
Copy link
Author

Running the secret key also gives me the same error, so I'm unsure of how to move forward from here.

@JBooker10
Copy link
Owner

@Brandnewson Seems like this is not a problem with the client. This error is being returned directly from iex. Make sure you are using the PUBLISHABLE token instead of the secret.

@Brandnewson
Copy link
Author

okay thanks! I'll check what's the issue with them.

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

2 participants