I want to integrate the login API to the custom UI form made in the React but not able to understand how to do

I have called the /authorize api call but not able to get success it shows 400

It sounds like you are looking for Embedded Login.