Hi,
I’m trying to use JTW token authentication with the Atlas Data API, but for some reason, I’m not able to send a successful http request. I always get an error:
{"error":"invalid session: error finding user for endpoint","error_code":"InvalidSession","link"
I follow the example from this tutorial, my JWT token is valid, auth provider is enabled, I turned user settings ON to create a user upon firing the request, but still does not work. Maybe someone had similar problem in the past and knows a solution?
curl --location --request POST 'https://data.mongodb-api.com/app/data-omokj/endpoint/data/v1/action/findOne' \
--header 'jwtTokenString: $(cat jwt_token.txt)' \
--header 'Content-Type: application/json' \
--data-raw '{
"collection":"comments",
"database":"sample_mflix",
"dataSource":"Cluster0"
}'
{"error":"invalid session: error finding user for endpoint","error_code":"InvalidSession","link":"https://realm.mongodb.com/groups/63c64ff4321fa57bd122d796/apps/63c651a5496b3411bdfa2936/logs?co_id=63
BR
Arek