Skip to content

调用 Dingtalk.getAccessToken() 会得到 400 错误 #36

Open
@Mdxin

Description

@Mdxin

包名:alibabacloud/dingtalk
文档地址:https://open.dingtalk.com/document/orgapp/obtain-the-access_token-of-an-internal-app

试图获取 accessToken 会得到如下错误:

[Missingbody]TeaUnableRetryError in OpenApiClient.php line 744
code: 400, body is mandatory for this action. request id:

微信截图_20241009113803

经查看,发出请求的 content-typeapplication/x-www-form-urlencoded,但是https://api.dingtalk.com/v1.0/oauth2/accessToken接口似乎只接受json格式。

微信截图_20241009114437

微信截图_20241009114531

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions