BP_0041 on successful login

Hi,
When i try to login using my correct credentials, it succeed on this API

curl 'https://xxx/api/v1/auth/login/basic/default' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Referer: https://xxx/admin/login/default' \
  -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36' \
  -H 'Content-Type: application/json;charset=UTF-8' \
  --data-binary '{"email":"xxx","password":"xxxx"}' \
  --compressed
{"status":"success","message":"Login successful","payload":{"token":"eyJhb...c"}}

but fail on this API:

curl 'https://xxx.com/api/v1/auth/me/workspaces' \
  -H 'authority: xxx.com' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'authorization: Bearer eyJhbG...Iociwd3USShVWnIKmaFs1cN-0' \
  -H 'x-bp-workspace: default' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36' \
  -H 'sec-fetch-site: same-origin' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-dest: empty' \
  -H 'referer: https://xxx/admin/login/default' \
  -H 'accept-language: en-US,en;q=0.9' \
  -H 'cookie: _ga=GA1.3.1972828644.1581953342; intercom-id-ivfy1930=4ca5958a-362a-4d75-a526-32382a504563; intercom-session-ivfy1930=; _gid=GA1.3.1947745490.1595837374' \
  --compressed
{"statusCode":401,"errorCode":"BP_0041","type":"UnauthorizedError","message":"Unauthorized: Authorization header is missing","details":"","docs":"https://botpress.com/docs"}

although that this was working before.
note that a pro license is installed and it is not expired yet.
Thank you.

Hi @alineo7,

I’ve just tried it out with Postman and your curl statement, I get a success for both.
Make sure you have a valid Bearer token. You may use the following statement to get it:

curl -X POST -H “Content-Type:application/json” -d “{“email”: “user”, “password”: “userpw” }” http://localhost:3000/api/v1/auth/login/basic/default

Let me know if you are still having issues.

Cheers!