algolia / firestore-algolia-search

Apache License 2.0
112 stars 35 forks source link

Error when inserting data from Client #51

Closed superdiazzz closed 3 years ago

superdiazzz commented 3 years ago

Hi, am really new using algolia, i don't know but i have following all step in firebase extension doc. I install algolia through firebase extension.

I created new api key and divert it to proper indices(by creating new indices). But i got error in algolia functions when i inserted new record from my website, what logs said is:

Error when performing Algolia index {"transporterStackTrace":[{"triesLeft":3,"response":{"isTimedOut":false,"status":403,"content":"{\"message\":\"Index not allowed with this API key\",\"status\":403}"},"host":{"accept":2,"url":"NZ3GVUOMSD.algolia.net","protocol":"https"},"request":{"url":"https://NZ3GVUOMSD.algolia.net/1/indexes/algoId/batch?x-algolia-agent=Algolia%20for%20JavaScript%20(4.8.6)%3B%20Node.js%20(10.24.1)%3B%20firestore_integration%20(0.5.1)","connectTimeout":2,"data":"{\"requests\":[{\"action\":\"partialUpdateObject\",\"body\":{\"objectID\":\"crSuskBJaQpfOAODUNey\",\"title\":\"Test 5\",\"category\":\"kesehatan\",\"lastmodified\":{\"_operation\":\"IncrementSet\",\"value\":1626963102502}}}]}","method":"POST","headers":{"x-algolia-application-id":"NZ3GVUOMSD","x-algolia-api-key":"*****","content-type":"application/x-www-form-urlencoded"},"responseTimeout":30}}],"name":"ApiError","status":403}

Then, i checked algolia dashboard and there is nothing there, still empty. Can somebody explain to me what happened here? Thanks

smomin commented 3 years ago

Its seems like the API key you are using might not have the correct permissions or set to a specific index. Can you provide me your Algolia Firebase Extension configuration and the screenshot of your API key permissions. Make sure to redact important information.

superdiazzz commented 3 years ago

Its seems like the API key you are using might not have the correct permissions or set to a specific index. Can you provide me your Algolia Firebase Extension configuration and the screenshot of your API key permissions. Make sure to redact important information.

Sure, this is my config Screen Shot 2021-07-23 at 06 44 53 and my api key ini red box Screen Shot 2021-07-23 at 06 47 03

superdiazzz commented 3 years ago

@smomin can you help me, sir?

smomin commented 3 years ago

Yes, the index name you are using in the firestore extension does not match the name that is permissioned in algolia. In you firestore extension configuration, change the name to dev_skillBrau. That should fix it.

superdiazzz commented 3 years ago

Yes, the index name you are using in the firestore extension does not match the name that is permissioned in algolia. In you firestore extension configuration, change the name to dev_skillBrau. That should fix it.

thank you, it's works