Metabase API Session token


I I am trying to get my session token from metabase and I am using the /api/session API to find it. But when i pass the authentication values using the curl command shown below, I get the output as a single character ‘P’. My metabase is running on 8443. Any help would be appreciated.

curl -X POST
-H “Content-Type: application/json”
-d ‘{“username”: ““, “password”: “MetabasePassword”}’

Hi @devops

I’m not sure if the forum is messing with formatting, but you’re not using plain double/single quotes.

curl -X POST -H "Content-Type: application/json" -d '{"username": "", "password": "MetabasePassword"}' http://localhost:8443/api/session 

You can add verbose to the command to see more debugging details with curl --verbose ...

Also, are you using SSL/TLS in Jetty or via a reverse proxy? Then you need to change http:// to https://

And lastly, check the Metabase log to see if you’re even talking to Metabase yet.