HTTP ENDPOINT findOne "User not found"

Hello,

I’m trying to fetch a document from the findOne endpoint, but it gives me an error in the logs: “user not found”.

The endpoint is public and could be called by anyone, so why is it requesting a user? This is the structure of my request:

const response = await fetch(https://{location}.aws.data.mongodb-api.com/app/{app-id}/endpoint/data/v1/action/findOne?ms=${Date.now()}, {
method: “POST”,
headers: {
“Content-Type”: “application/json”,
“Access-Control-Request-Headers”: “*”,
},
body: JSON.stringify({
“collection”: “mycollection”,
“database”: “mydb”,
“dataSource”: “mongodb-atlas”,
“filter”: {
“_id”: { “$oid”: id }
}
})
});
const data = await response.json();

The ID exists in the collection, and it was working previously. It’s not retrieving any document or data, and I’m pretty confused.
(its not a custom http endpoint, its just the findOne that mongodb provides)

Thanks.