Store api login gives CHECKOUT__CUSTOMER_AUTH_BAD_CREDENTIALS

I am trying to login in in a shop using “store-api/v3/account/login” API. My header contains sw-access-key. I am sending username and password as JSON Data. The username and password works to login in the shop frontend but the api gives back 
“{“errors”:[{“status”:“401”,“code”:“CHECKOUT__CUSTOMER_AUTH_BAD_CREDENTIALS”,“title”:“Unauthorized”,“detail”:“Invalid username and/or password.”,“meta”:{“parameters”:}}]}”

What am I doing wrong here? I tried sending username and password in the Header as well but it didn’t work. ​

Thanks in advance. 

  • Udeep