如何为sinch用户调用报告API生成应用程序签名请求

时间:2016-06-21 05:53:30

标签: android sinch android-sinch-api

我想从sinch获取用户呼叫报告,因为我需要生成应用程序签名请求。

https://www.sinch.com/docs/voice/rest/#UserCallReport

我无法在文档中找到为android生成应用程序签名请求的演示。

我在邮递员发送火警请求时收到此错误消息

请求:     获取https://reportingapi.sinch.com/v1/users/username/jigar1/calls/

public static void validate(MyItem myItem, String argumentValue) {
    if (myItem == null) {
        throw new MyArgumentException(argumentValue+" is null");
    }
}    

回复:

Params -> Authorization : Application 554042e3-965c-4e88-a7b8-3f2b52c278f3:t0fsMPGjaNiAEjT+29FyHnHuzaKDAOT3rShXWQp3IcA=
          X-Timestamp : 2016-06-21T06:37:43Z

3 个答案:

答案 0 :(得分:0)

您可以在此处找到伪代码 https://www.sinch.com/using-rest/#applicationsignedrequest

或者您可以使用基本身份验证

答案 1 :(得分:0)

我使用过Sinch的一些报道。要对我的请求进行身份验证,请使用Sinch Github account中的演示,您可以查看repo here。这对你来说很好。

请求https://reportingapi.sinch.com/v1/users/username/1234571/calls/我得到了回复

{
"start": "2017-10-31T00:00:00",
"duration": 0,
"success": 0,
"failed": 0
}

答案 2 :(得分:-1)

我尝试做同样的事情并将代码发布在:

User Call Report API gives incorrect results

基于:

https://www.sinch.com/tutorials/sign-requests-java

我对该代码有不同的问题,但至少它没有 给任何"无效的签名"消息。