Confirm-twitter api returning error 500

I am building an application where I need to connect the ceramic DID with Twitter, so I am using the AlsoKnownAs model, the problem is that though I am able to generate challenge code using request-twitter API the confirm-twitter API is not working, it responds with error 500 when I send the jws generated by ceramic did for that challenge code via a post request.