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, 2023- ankur745Oct 05, 2023Copper ContributorHey 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!
- ankur745Oct 04, 2023Copper Contributor
Prasad_Das-MSFT No, it's not helpful. I'm receiving data from my server API but Teams SDK not passed that data to me... in code getting type = CORS issue..looks like Teams SDK restricting data . I have attached two screenshots to my question.
Is the team's app tab allowing to call 3rd Party API?