Share via

Trying to make a basic auth API call from Office Script

Anonymous
2025-01-23T13:24:08+00:00

Using this and it fails to fetch. Where am I missing it

async function main(workbook: ExcelScript.Workbook) {const response = await fetch('https://postman-echo.com/basic-auth', {method: 'GET',headers: {'Authorization':'Basic cG9zdG1hbjpwYXNzd29yZA=='}});const jsonData: object[] = await response.json();console.log(jsonData);

}
Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2025-01-23T18:25:01+00:00

    I would suggest creating a new thread on the Office Development channel, which is specifically designed to handle Office script questions. This way, you can get more specialized assistance for your query. 

    Office Development - Microsoft Q&A 

    Thank you for your understanding.

    Was this answer helpful?

    0 comments No comments