gpt4 book ai didi

azure - 如何在Azure数据工厂中传递不记名 token API

转载 作者:行者123 更新时间:2023-12-02 06:04:42 24 4
gpt4 key购买 nike

我有一个 API,它具有授权和不记名 token 。我在 postman 中进行了测试,它正在工作。但是,当我在 ADF 中使用 Web 事件时,它不起作用。

enter image description here

我在 URL 部分传递 URL。创建新 header ,输入授权并指定值“Bearer token”

出现以下错误

Error
Troubleshoot activity failures
{
"errorCode": "2108",
"message": "{\"error\":{\"type\":\"invalid_request_error\",\"message\":\"Request forbidden by administrative rules. Please make sure your request has an acceptable User-Agent header.\",\"documentation_url\":\"https://developer.dentally.co\"}}",
"failureType": "UserError",
"target": "Web1",
"details": []
}


谁能给点建议吗?

最佳答案

我在我的环境中重现了相同的内容。我成功使用 Postman 生成了不记名 token 。

解决上述错误代码:2200。请遵循以下方法。

enter image description here

  • 我在 Web 事件中使用了相同的 URL,并在 Azure 数据工厂中生成了不记名 token 。 enter image description here

  • 生成不记名 token ,如下所示:

enter image description here

  • 将 Web 事件 2 与新创建的 Web1 事件连接

enter image description here

  • 添加动态表达式:Bearer @{activity('Web2').output.data.Token}

enter image description here

输出:

enter image description here

引用:

Sample Rest API URL for testing with authentication by Ashok Patel

关于azure - 如何在Azure数据工厂中传递不记名 token API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73760418/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com