[UWP] ClientIdNotAuthorized对报告耗材产品的响应已完成 [英] [UWP] ClientIdNotAuthorized response to Report consumable product as fulfilled

查看:69
本文介绍了[UWP] ClientIdNotAuthorized对报告耗材产品的响应已完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我们正在关注此文档:

https://docs.microsoft.com/en-us / windows / uwp / monetize / report-consumable-products-as-fulfilled

https://docs.microsoft.com/en-us/windows/uwp/monetize/report-consumable-products-as-fulfilled

报告从服务中获得的消费品。似乎在Azure AD和开发人员中心中为UWP应用程序正确配置了所有内容。我们可以在UWP应用中获取用户的Microsoft Store Key ID,发送到服务,当我们尝试
来完成服务中的产品时,我们收到此错误:

To report a consumable product as fulfilled from a service. Everything seems to be properly configured in Azure AD and in the Dev Center for the UWP app. We can get the Microsoft Store Key Id for the user in the UWP app, sent to the service and when we try to fulfil the product from the service we get this error:

{

  " code":" InternalServerError",

  "innererror":{

    "来源":" CollectionsFD",

    "邮件":"收件人从权利收到错误。",

    "code":"EntitlementsError",

    "数据":[

      "ClientIdNotAuthorized",

      "请求中指定的客户ID无权使用此资源",

      ; "...编辑......"

    ],

    "详情":[]

  },

  " source":" CollectionsFD",

  "详情":[],

  " message":"处理操作时发生内部服务器错误。",

  "数据":[]

}

如果我们尝试使用StoreContext.ReportConsumableFulfillmentAsync从应用程序中完成产品,它可以工作。

If we try to fulfil the product from the app using StoreContext.ReportConsumableFulfillmentAsync, it works.

我找不到有关此错误的信息。你能帮我们理解缺少什么吗?

I can't find information about this error. Could you help us understand what is missing?

谢谢!

Luis

推荐答案

您好Luis,

Hi Luis,

欢迎来到开发通用Windows应用程序论坛!请使用
标记
,谢谢!

Welcome to the Developing Universal Windows apps forum! Please utilize tagging when posting to this forum, thanks!

从您的错误消息中:请求中指定的客户端ID无权使用此资源。您似乎在访问令牌上遇到了一些问题。

From your error message: client id specified in request is not authorized to use this resource. It seems that you have some issue on the access token.

我们知道,每个令牌的生命周期为60分钟,您需要检查令牌是否已过期并在之后刷新它们会过期。

As we know, The lifetime of each token is 60 minutes, you need to check the token whether it is expired and refresh them after they expire.

我建议你参考
管理服务的产品权利
,并检查有关使用Microsoft Store集合API和购买API的端到端流程的步骤。

I suggest you refer Manage product entitlements from a service and check the steps about the end-to-end process for using the Microsoft Store collection API and purchase API.

最诚挚的问候,

Yong Lu


这篇关于[UWP] ClientIdNotAuthorized对报告耗材产品的响应已完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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