내 커뮤니티 업적 표시줄을 확대합니다.

Don’t miss the Workfront AMA: System Smarts & Strategic Starts! Ask your questions about keeping Workfront running smoothly, planning enhancements, reporting, or adoption, and get practical insights from Adobe experts.

Failed to fetch api using office script

Avatar

Level 1

I tried to use excel automate script to fetch project data and got error "failed to fetch", however I can get correct response if I access the URL on web browser. Does anyone know why it's not function with excel script? Please help~ thanks. 

 

HuwittLi_0-1732981374682.png

 

주제

토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.

4 답변 개

Avatar

Community Advisor

@Hu_Li-_- 

 

most likely a CORS issue

https://stackoverflow.com/questions/77279755/office-script-in-excel-365-failed-to-fetch-for-some-url...

 

While hitting the API with a browser works, it does not when you e.g. use javascript to make the API call... 

 

Best I got is to use Fusion as your endpoint for OfficeScript. It's lame and I've asked Support but was told the Dev team considers this a security issue 😕 

Avatar

Level 1

Thanks for your reply, the problem is I don't have fusion in my plan🤷‍♂️. is there any other way to let office and Workfront talk to each other? I do able to use Python, but it is not so friendly for everyone especially BOSSss🤣

Avatar

Community Advisor

If you run an endpoint using Python, you can hit that endpoint from Excel, and then use Python to call the API. 

Avatar

Community Advisor

I would raise a ticket nonetheless with support so they see their CORS block for API calls is a bit (in my eyes) misguided