Discussions
Issue with API requests requiring redirect URLs within ReadMe iframe
We’re experiencing an issue when trying to make API requests that involve a redirect_uri parameter from within a ReadMe API Explorer (iframe). Normally, standard API calls work fine within the embedded iframe, but when the endpoint requires a redirect flow (such as OAuth authorization), the request fails or does not behave as expected. Thanks for the help!!!
Here’s an example of the request that fails:
const options = { method: 'GET', headers: { accept: 'application/json' } };
fetch('https://sandbox.opengateway.telefonica.com/apigateway/authorize?response_type=code', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
This API requires a redirect URL as part of the authorization process, but it seems the redirect cannot be properly handled within the ReadMe iframe environment. As a result, the flow does not complete and no valid response is returned.