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

403 on client.scroll (yet working in python) #74

Open
thomasf1 opened this issue May 16, 2024 · 1 comment
Open

403 on client.scroll (yet working in python) #74

thomasf1 opened this issue May 16, 2024 · 1 comment

Comments

@thomasf1
Copy link

thomasf1 commented May 16, 2024

Trying to port over some code from python, but getting an 403 while the same request with the same server etc works with the python code:

import {QdrantClient} from '@qdrant/js-client-rest';

const QDRANT_COLLECTION = "test_8";
const client = new QdrantClient({
    url: "https://(redacted).gcp.cloud.qdrant.io:6333",
    api_key: "(redacted)"
});

const res = client.scroll(QDRANT_COLLECTION) // simplest possible, also tried with options like limit etc.
const res2 = await res

Gets the following - however the same code in python gets a result (tried it before and after the js code):

ApiError: Forbidden
    at Object.fun [as scrollPoints] (file:///Users/tom/Dev/gt/node_modules/@qdrant/openapi-typescript-fetch/dist/esm/fetcher.js:169:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async QdrantClient.scroll (file:///Users/tom/Dev/gt/node_modules/@qdrant/js-client-rest/dist/esm/qdrant-client.js:322:26)
    at async file:///Users/tom/Dev/gt/serve_node.js:27:14 {
  headers: Headers {
    [Symbol(headers list)]: HeadersList {
      cookies: null,
      [Symbol(headers map)]: Map(3) {
        'content-length' => { name: 'content-length', value: '21' },
        'content-type' => {
          name: 'content-type',
          value: 'application/json; charset=utf-8'
        },
        'date' => { name: 'date', value: 'Thu, 16 May 2024 13:17:33 GMT' }
      },
      [Symbol(headers map sorted)]: null
    },
    [Symbol(guard)]: 'immutable',
    [Symbol(realm)]: null
  },
  url: 'https://(redacted).gcp.cloud.qdrant.io:6333/collections/vguys_test_8/points/scroll',
  status: 403,
  statusText: 'Forbidden',
  data: { error: 'forbidden' }
}

@Anush008
Copy link
Member

Hi @thomasf1.
It should've been apiKey instead of api_key.

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