Use RegEx In Callback URL On API Manager Store
2 min readDec 13, 2018
Now we can use multiple callback URLs as a regex pattern using WSO2 API Manager.
regexp=(http://test1.com|http://test2.com)
Use case
- Setup Playground application and deploy it in Tomcat.
- Start WSO2 API Manager and login to API Store.
- Create a new application.
- For the Callback URL provide as below.
regex=(http://localhost:8080/playground2/oauth2client| http://wso2is.local:8080/playground2/oauth2client)
5. Navigate to Playground application
http://localhost:8080/playground2/oauth2client
6. Provide the following details.
Client Id: Your consumer key in the application
Callback URL: http://wso2is.local:8080/playground2
Authorize Endpoint: https://localhost:9443/oauth2/authorize
You will get the authorization code as below after set of steps.
For the callback URL you can either use http://localhost:8080/playground2/oauth2client or http://wso2is.local:8080/playground2/oauth2client. Because you registered both the URLs in step 4.
But assume you remove http://localhost:8080/playground2/oauth2client from the callback URL and perform step 5, then you will not be able to log in since it is now not a registered URL.
You will get the following error.