Forum Discussion
ankur745
Oct 03, 2023Copper Contributor
Geeting CORS in API while calling inside Teams APP TAB
Getting CORS in API while calling inside Teams APP TAB Calling API in Teams App TAB const u = `${domain}/api/login.json`;
fetch(u, requestOptions)
.then(resp => {
} While calling API w...
Prasad_Das-MSFT
Microsoft
Oct 03, 2023ankur745
Oct 05, 2023Copper Contributor
Hey basically I want to call 3rd party API.. so how i can simply call API?
- Prasad_Das-MSFTOct 11, 2023
Microsoft
ankur745 -
Teams Platform/SDK doesn't do anything to interfere with AJAX requests made by apps. CORS is standard mechanism implemented by all browsers that limits cross-origin network calls. If an app is trying to make a cross-origin network request, then the backend API must allow it first by responding correctly to the OPTIONS call. Here is an example:
There is documentation on CORS here:
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
Could you please provide us Fiddler trace of the request, so that we will be able to point out what the exact issue is?
- Prasad_Das-MSFTOct 05, 2023
Microsoft
ankur745 - We are checking this with engineering team. We will inform you once we hear anything from them. Thanks!