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

Improve pushData section ( #722

Silver-birder opened this Issue Oct 1, 2018 · 1 comment


None yet
2 participants

Silver-birder commented Oct 1, 2018

Do you want to request a feature or report a bug?


What is the current behavior?


⋊> ~/work npm -v
⋊> ~/work yarn -v
fish: Unknown command 'yarn'

install npm package

⋊> ~/work npm init 
⋊> ~/work npm install algoliasearch --save 
work@1.0.0 /Users/silver/work
└── algoliasearch@3.30.0

npm WARN work@1.0.0 No description
npm WARN work@1.0.0 No repository field.


⋊> ~/work cat index.js
var client = algoliasearch('****', '****'); # I use Search-Only API Key ...
var index = client.initIndex('contacts');

var contactsJSON = require('./contacts.json');

index.addObjects(contactsJSON, function(err, content) {
  if (err) {

⋊> ~/work node index.js
AlgoliaSearchError: Not enough rights to add an object near line:1 column:332

I resolved if I use Admin API Key but not Search-Only API Key.

If the current behavior is a bug, please provide all the steps to reproduce and a minimal
JSFiddle example or a repository on GitHub that we can npm install
and npm start.

no bug.

What is the expected behavior?

Please comment that use Admin API Key on pushData section (here)


This comment has been minimized.


Haroenv commented Oct 1, 2018

Adding objects needs to be done with the admin API key, that should indeed be mentioned there.

Haroenv added a commit that referenced this issue Oct 1, 2018

@Haroenv Haroenv closed this in #723 Oct 1, 2018

Haroenv added a commit that referenced this issue Oct 1, 2018

docs(readme): clarify which API key to use (#723)
* docs(readme): clarify which API key to use

fixes #722

* Update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment