AWS SNS - 创建平台端点

时间:2018-01-04 10:32:01

标签: c# .net push-notification aws-sdk

 public async Task<string> CreatePushEndpoint(string deviceToken,string platformApplicationArn )
 {

        if (string.IsNullOrEmpty(deviceToken))
            throw new Exception("Required parameters missing");
        var publishRequest = new CreatePlatformEndpointRequest()
        {
            PlatformApplicationArn = platformApplicationArn ,
            Token = deviceToken                
        };
        var resp = await _client.CreatePlatformEndpointAsync(publishRequest);
        return resp.EndpointArn;
  }

这是我创建平台端点的代码。但这不起作用。任何人都可以帮助我吗?

0 个答案:

没有答案