【发布时间】:2014-08-08 14:48:42
【问题描述】:
我正在尝试使用 valance api 来调用一些方法。我正在使用 https://apitesttool.desire2learnvalence.com 进行身份验证,从那里获取 UserId 和 UserKey。现在很困惑我应该在 x_a - x_d 参数中传递什么来获取组织信息。
无论我通过什么,我都会收到 403 禁止和不正确的令牌异常。
请一些人帮忙。我正在传递参数。
x_a : 应用程序 ID
x_b : 用户 ID(我从 https://apitesttool.desire2learnvalence.com 得到这个)
x_c : private String calculateParameterExpectation( String key, String httpMethod, String apiPath, long timestamp)
{
String unsignedResult = String.format("%s&%s&%s", httpMethod, apiPath, timestamp);
System.out.println(unsignedResult);
String signedResult = D2LSigner.getBase64HashString(key, unsignedResult);
return signedResult;
} Where key is the App Key
x_d : private String calculateParameterExpectation(
String key, String httpMethod, String apiPath, long timestamp) {
String unsignedResult = String.format("%s&%s&%s", httpMethod, apiPath, timestamp);
System.out.println(unsignedResult);
String signedResult = D2LSigner.getBase64HashString(key, unsignedResult);
return signedResult;
} Where key is the User Signature that i got from https://apitesttool.desire2learnvalence.com
我不确定做错了什么。
【问题讨论】:
标签: desire2learn