Troubleshooting 'Registered callback does not match with the provided URL' error¶
The Registered callback does not match with the provided URL error can be encountered during the API Publisher(
https://<hostname>:9443/publisher) and API Developer Portal (
https://<hostname>:9443/devportal) login attempts, in a case where the hostname of the API Manager has been changed after accessing the Developer Portal or Publisher apps via different hostnames.
For example, let's assume that you have started a fresh APIM server and accessed the API Publisher and Developer Portal apps via localhost. If you have changed the hostname of the server from
apim.wso2.com, the next login attempt to API Publisher or Developer Portal will be failed giving this error.
This error has been occurred due to the mismatch of the API Publisher or API Developer Portal access URLs((
https://<hostname>:9443/devportal) and callback URLs which are configured in API Publisher and API Developer Portal Service Providers.
Please follow below steps to fix the login failure due to callback URL mismatch.
- Sign in to the Management Console (
Navigate to service providers list.
Click on the Edit button of API Publisher service provider
Navigate to Inbound Authentication Configuration > OAuth/OpenID Connect Configuration and click on OAuth application edit button.
See the Callback Url regex value configured under Application Settings. You will observe that the callback URL value is having a different hostname(
localhostor previous hostname which was configured before the hostname change).
Then replace the callback URL hostname with the current hostname of the server. For example, if the current hostname of the server is
apim.wso2.com, the callback URL regex has to be changes as follows.
Click on Update button in Applications Settings page, then the Update button of service provider information page to save the callback URL change.
Select the service provider for API Developer Portal (
admin_admin_store) and repeat the step 4 - step 6 to apply the same changes.