Couldn't add device on smart thing app

Welcome to the SmartThings Community, @Rustam_Niraula!
If the error is received before you get the login page from your OAuth server, you should check if there’s an issue with it because this is the first URL called.

If you’re having issues with this kind of integration, here are some samples to get you started:

Let me know if you have any doubts.