Reputation: 21
When I call 'https://apisandbox-api.zuora.com/rest/v1/accounts' with required apiAccessKeyId, apiSecretAccessKey and parameters, I recieve the response
{
"success": false,
"reasons": [
{
"code": 90000011,
"message": "this resource is protected, please sign in first"
}
]
}
Not clear what is exact issue.
Upvotes: 1
Views: 2533
Reputation: 29
You need to call the connection api first in order to access any object in the Zuora sandbox.
Request URL GET: https://apisandbox-api.zuora.com/rest/v1/connections
and the response you would see:
{ "success": true }
Give it a try after calling this Api. It should be resolved then.Thanks.
Upvotes: 2
Reputation: 2989
You need to sign in first, there is an example in the Zuora SDK using a ConnectionManager source :
final ZClient Z_CLIENT = new ZClient();
final ConnectionManager cm = new ConnectionManager();
if (!cm.isConnected(Z_CLIENT, (String) ZConfig.getInstance().getVal("default.tenant.user.id"),
(String) ZConfig.getInstance().getVal("default.tenant.password")))
{
throw new RuntimeException("Couln't open a connection to Zuora API !");
}
Upvotes: 0