Check more documentation at https://gateway-sandbox.dokobit.com/api/doc.
Request developer access token here.
Check Mobile ID and Smart-ID test data here.
- Enter API access token (accessToken) to Program.cs:21
- Enter callback url (callbaclkUrl) to Program.cs:28
Enter your file name, url and SHA256 digest in Main
and update CreateSigning
method with apropiate content values (or use testing ones provided).
To run this example, execute it like this: dokobit_gateway_example {command} {token}
where command
is:
upload_file
- Upload file and gettoken
(#api)check_file_status
- Check file status (token
required) (#api)create_signing
- Create new signing (token
required) (#api)demo
(default - all of above)
- Upload file you want to sign* and get uploaded file token.
- Check file upload status. If status
uploaded
**, continue.
* You should provide file URL which would be accessible for Documents Gateway. ** File status must be checked before creating signing.
- See
UploadFile
method for example or use console commandupload_file
for uploading file. - See
CheckFileStatus
method for example or use console commandcheck_file_status
for checking file status (use token as second parameter).
-
Use file token provided with file upload response.
-
Add as many signers as you need.
-
See
CreateSigning
method for example or use console commandcreate_signing
for creating signing (use token as second parameter).
Signing URL formation: https://gateway-sandbox.dokobit.com/signing/SIGNING_TOKEN?access_token=SIGNER_ACCESS_TOKEN.
URL is unique for each signer.
SIGNING_TOKEN
: token received with signing/create
API call response.
SIGNER_ACCESS_TOKEN
: token received with signing/create
API call response as parameter signers
.
Signers represented as associative array where key is signer's unique identifier - personal code.
Navigate to signing URL, sign document.
After successful signing, you have two ways to get the signed file.
Postback calls are trigered, if postback_url
was set while creating signing.
There are four types of postback calls:
signer_signed
- after signer has signed document.signing_completed
- after signing has been completed (all signers successfully signed).signing_archived
- after document was archived (for signings with PADES-LTV and XADES-XL levels only).signing_archive_failed
- after document couldn't be archived (for signings with PADES-LTV and XADES-XL levels only).
After each signature, a request to the specified endpoint with signer information and signed document will be made.
If you want to have JavaScript events, add its support by following the instructions here.
After receiving "onSignSuccess" callback, you can request signing status from your backend by making GET request to /api/signing/SIGNING_TOKEN/status.json and fetch signed document by using "file" parameter in the response.