Custom port is not allowed or the host is not registered with this consumer key -yahoo developer network

To work around this error Custom port is not allowed or the host is not registered with this consumer key. Register the app as Desktop/Client application instead of web app.