验证失败。提供的凭据无效或帐户处于非活动状态 [英] Authentication failed. Either supplied credentials are invalid or the account is inactive

查看:124
本文介绍了验证失败。提供的凭据无效或帐户处于非活动状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试设置集成功能,以便将来电报告为Bing Ads API的转化。

We're trying to set up an integration to report phone calls as conversions to the Bing Ads API.

我们一直试图在https://github.com/BingAds/BingAds-Python-SDK上使用Python示例,但无论我们做什么,我们都会得到:

We've been attempting to use the Python examples at https://github.com/BingAds/BingAds-Python-SDK but no matter what we do we get:

<AdApiError><Code>105</Code><Detail i:nil="true"/><ErrorCode>InvalidCredentials</ErrorCode><Message>Authentication failed. Either supplied credentials are invalid or the account is inactive</Message></AdApiError>

在首次通话期间失败,尝试获取用户数据以设置帐户ID和客户ID。

It fails during the first call, where it tries to get user data to set the account ID and customer ID.

我还使用PostMan尝试手动设置,我们得到相同的结果。

I've also used PostMan to try to set this up manually, and we get the same result.

为此,我们打电话给  https://login.live.com/oauth20_token.srf with headers:

For this, we're making a call to https://login.live.com/oauth20_token.srf with headers:

client_id:xxxxx
grant_type:authorization_code
code:xxxxx
redirect_uri:https://login.live.com/oauth20_desktop.srf

返回:

{
    "token_type": "bearer",
    "expires_in": 3600,
    "scope": "bingads.manage",
    "access_token": "access_token_here",
    "refresh_token": "xxxxxxx",
    "user_id": "xxxxxx"
}

然后我们发送到  https://clientcenter.api.bingads.microsoft.com/Api/CustomerManagement/v12/CustomerManagementService.svc:

We then send to https://clientcenter.api.bingads.microsoft.com/Api/CustomerManagement/v12/CustomerManagementService.svc :

<SOAP-ENV:Envelope xmlns:ns0="https://bingads.microsoft.com/Customer/v12" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://bingads.microsoft.com/Customer/v12" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
	<SOAP-ENV:Header>
		<tns:AuthenticationToken>auth_token_here</tns:AuthenticationToken>
		<tns:DeveloperToken>xxxxx</tns:DeveloperToken>
	</SOAP-ENV:Header>
	<ns1:Body>
		<ns0:GetUserRequest/>
	</ns1:Body>
</SOAP-ENV:Envelope>

并且返回:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <s:Fault>
            <faultcode>s:Server</faultcode>
            <faultstring xml:lang="en-US">Invalid client data. Check the SOAP fault details for more information</faultstring>
            <detail>
                <AdApiFaultDetail xmlns="https://adapi.microsoft.com" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                    <TrackingId>4cfbc6a0-b3d8-4d03-aa43-5ef18b05dc7e</TrackingId>
                    <Errors>
                        <AdApiError>
                            <Code>105</Code>
                            <Detail i:nil="true"/>
                            <ErrorCode>InvalidCredentials</ErrorCode>
                            <Message>Authentication failed. Either supplied credentials are invalid or the account is inactive</Message>
                        </AdApiError>
                    </Errors>
                </AdApiFaultDetail>
            </detail>
        </s:Fault>
    </s:Body>
</s:Envelope>

无论我们是通过代码还是通过邮递员提出请求,都会发生这种情况。有人可以帮助我们了解正在发生的事情吗?

谢谢!




推荐答案

看起来您在获取Microsoft帐户的访问令牌时没有任何问题。您是否确认凭据可以访问一个或多个Bing Ads帐户,例如在Web UI中?

105错误
通常表示凭据,开发令牌或环境不匹配。与支持人员开始对话以确认访问权限可能是最有效的。

It looks like you are having no issues getting an access token for the Microsoft account. Have you confirmed that the credentials have access to one or more Bing Ads accounts e.g., in the Web UI? The 105 error typically indicates a mismatch of credentials, dev token, or environment. It might be most efficient to start a conversation with support to confirm access.


这篇关于验证失败。提供的凭据无效或帐户处于非活动状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆