Tyk redirect URI to Apps Script callback not working

Hello ,

I am writing a DataStudio connector in Apps Script that uses the OAuth2 library to fetch data from Cloud Spanner which is a GCP Service. I have set redirect URI to the apps script as mentioned in the OAuth2 library for Apps Script. However the redirect is failing with a Google Drive broken page. Can someone help?

Thanks
Dheeraj