Ibm mobilefirst 在IBM bluemix云上找不到推送通知服务的appSecret

Ibm mobilefirst 在IBM bluemix云上找不到推送通知服务的appSecret,ibm-mobilefirst,ibm-cloud,Ibm Mobilefirst,Ibm Cloud,我想通过Java应用程序使用PushNotInfinition服务,以便需要该服务的appGuid和appSecret。(此消息所附的图显示了appSecret应该显示但没有显示的窗口)一些文档说,当应用程序绑定到服务时,appSecret会自动生成,但我无法理解绑定过程。 因此,我想尽可能详细地了解发布PushNotification服务的appSecret的过程。如果有人能用每个进程窗口的屏幕截图进行解释,我将不胜感激。@ken我们在swagger()中同时支持AppSecret和令牌。对于

我想通过Java应用程序使用PushNotInfinition服务,以便需要该服务的appGuid和appSecret。(此消息所附的图显示了appSecret应该显示但没有显示的窗口)一些文档说,当应用程序绑定到服务时,appSecret会自动生成,但我无法理解绑定过程。
因此,我想尽可能详细地了解发布PushNotification服务的appSecret的过程。如果有人能用每个进程窗口的屏幕截图进行解释,我将不胜感激。

@ken我们在swagger()中同时支持AppSecret和令牌。对于创建的新实例,不会有任何AppSecret,因为它们是基于IAM的实例。除了身份验证的令牌方式之外,没有其他方式。 2018年6月之前创建的这些实例将与Appsecret一起使用。但新实例将仅与IAM令牌一起使用。这是为了更好的安全性而引入的。请参阅我们的发行说明。 要了解有关推送通知服务上IAM实现的更多信息,请参阅 请参阅常见问题部分中的问题21,了解如何检索令牌并使用

关于炫耀,引入了一个新的授权字段来提交IAM令牌。授权字段或appSecret是必需的

请参阅服务器sdk()自述文件,其中客户必须使用ApiKey为IAM令牌通过初始化方法自动生成的新推送实例初始化推送

PushNotifications.initWithApiKey(“您的应用程序ID”、“您的-BLUEMIX-PUSH-APIKEY”、PushNotifications.US\u SOUTH\u地区)

样本

public static void main(String[] args) {


    PushNotifications.initWithApiKey("appId", "APIKey", PushNotifications.US_SOUTH_REGION);
    Message message = new Message.Builder().alert("20% Off Offer for you").url("www.ibm.com").build();
    String [] deviceIds = {"deviceIds"};
    Target target = new Target.Builder().deviceIds(deviceIds).build();

    Notification notification = new Notification.Builder().message(message).target(target).build(); 
    PushNotifications.send(notification, new PushNotificationsResponseListener(){

        public void onSuccess(int statusCode, String responseBody) {
            System.out.println(responseBody);
            System.out.println("Successfully sent push notification! Status code: " + statusCode + " Response body: " + responseBody);
        }

        public void onFailure(Integer statusCode, String responseBody, Throwable t) {
            System.out.println("Failed sent push notification. Status code: " + statusCode + " Response body: " + responseBody);
            if(t != null){
                t.printStackTrace();
            }
        }
    });
}
希望这有帮助