Database CloudKit数据库查询问题

Database CloudKit数据库查询问题,database,web,cloudkit,Database,Web,Cloudkit,我刚开始构建一个web应用程序,出于某种原因,我不得不使用CloudKit及其数据库作为后端 我尝试了一个非常愚蠢的数据库查询,并打算在前端查看结果。这是我的密码: CloudKit.configure({ containers: [{ containerIdentifier: my identifier, apiToken: my api token, environment: 'development' }] }); var container = CloudK

我刚开始构建一个web应用程序,出于某种原因,我不得不使用CloudKit及其数据库作为后端

我尝试了一个非常愚蠢的数据库查询,并打算在前端查看结果。这是我的密码:

CloudKit.configure({
containers: [{
    containerIdentifier: my identifier,
    apiToken: my api token,
    environment: 'development'
  }]
});

var container = CloudKit.getDefaultContainer();
var DB = container.publicCloudDatabase;

var query = {recordType : 'Request'};

DB.performQuery(query).then(function(response){
  if (response.hasErrors) {
        throw response.errors[0];
    } else {
        console.log(response);
    }
});
但是,我不断收到此身份验证失败错误:

cloudkit.js:3 Uncaught (in promise) t {_ckErrorCode: "AUTHENTICATION_FAILED", _uuid: "4ef8ba12-eb00-408f-9a1c-6e8b4de84ec8", _reason: "no auth method found", _serverErrorCode: "AUTHENTICATION_FAILED", _extensionErrorCode: undefined…}
我试着用相同的代码获取一条记录,结果很好。 那么,错误是由用户中的未跟踪导致的吗?如果是,CloudKit Dashboard中是否有任何配置允许来自特定URL的用户在不登录的情况下查询数据库?
谢谢

检查集装箱识别器值。当我使用API令牌的标识符名称而不是从应用程序名称生成的iCloud标识符时,我遇到了类似的问题。您还可以通过链接使用CloudKit目录测试验证您的令牌