For ACCOUNT_WIF I was using the actual password and not the posting key. After changing that it is working well. Since it was WIF related issue other calls were working and only those where WIF was involved were throwing the error.
I wish the message was little more verbose. It could have saved me a lot of time :P
Thanks for your inputs.