SDK reference · Python SDK

prov.mandate.calls.register

prov.mandate.calls.register in Python SDK. Register a call before dialing (free): the registration and its short_code, or status: refused and a reason.

Signature

prov.mandate.calls.register(credential: str, challenge_code: Optional[str] = …) -> Any

Parameters

credentialstrRequired
challenge_codeOptional[str]

Request fields

credentialstringRequired
The call credential: a compact JWS (alg: EdDSA, typ: call+jws) signed with the agent's key. The format is on the call credential reference page.
challenge_codestring
The 6-digit code a business read out to challenge this call.

Returns

Any The call was refused; nothing was registered.

HTTP operation

POST /v1/mandate/calls: Register a call

Errors

Example

const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/calls`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "credential": "eyJhbGciOiJFZERTQSIsInR5cCI6ImNhbGwrandzIiwia2lkIjoiVjdfbDZXcmhkWEJRWlNzTXJ0UlB5WjJobzFDOFUtWXhmaFRfM3dOQUZZYyJ9.eyJ2IjoxLCJpc3MiOiJodHRwczovL2FwaS5wcm92ZW5hbmNlYXV0aC5jb20vdjEvcHVibGljL2FnZW50cy9hZ3RfMDFNNlhTODhLTkZUV0RHUDJNUkJTSkczV1IvZGlyZWN0b3J5IiwiYWdlbnQiOiJhZ3RfMDFNNlhTODhLTkZUV0RHUDJNUkJTSkczV1IiLCJmcm9tIjoiKzE0MTU1NTUwMTAwIiwidG8iOiIrMTQxNTU1NTAxMjMiLCJuYmYiOjE3OTQxNDg0MTAsImV4cCI6MTc5NDE0OTAxMCwianRpIjoiMTYxM2M0M2MtZjhmMS00N2FiLWI3NzctZmYxNzNiYmJhM2FhIiwicHVycG9zZSI6ImJvb2siLCJwdXJwb3NlX3RleHQiOiJUYWJsZSBmb3IgMiBhdCA3cG0gRnJpZGF5IiwiZ3JhbnQiOiJtZHRfMDFNNlhTODhNU1YzR0JLODc0VzYwNktTQkEiLCJkaXNjbG9zdXJlIjp7ImFpIjp0cnVlLCJzdGF0ZW1lbnQiOiJzcG9rZW5fYXRfc3RhcnQifSwiY29uc2VudCI6eyJiYXNpcyI6ImN1c3RvbWVyX3JlcXVlc3QiLCJyZWYiOiJib29raW5nLTQ0NzEifX0.S8Gz7NyrtwSU5pRZwN19YFnalXNd3f9GpqhopYw7yi-mIRurgmDp0VPuUZ_D-bOpmUB8--KE7kwaGyiM4HSVBg"
  }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.