Format as a QR Code
This guide will show you how to format your credentials as a QR code.
Prerequisites
You need the following in order to proceed with this tutorial:
Access to MATTR VII APIs. If you’re experiencing any difficulties, contact us.
The
payload
of a signed Compact or Compact Semantic credential.
Request
Make the following request to format a Compact Credential as a QR code:
1POST https://YOUR_TENANT_URL/v2/credentials/compact/qrcode
You can make a similar request to a different endpoint to format a Compact Semantic Credential as a QR code:
1POST https://YOUR_TENANT_URL/v2/credentials/compact-semantic/qrcode
Request body
1{
2 "payload": "CSC:/1/2KCE3IQEJB5DCMSMGZITM5QBE2QFSALWVQAXQI3ENFSDU53FMI5GYZLBOJXC45TJNEXGC5JQGEXG2YLUORZC4Z3MN5RGC3AFDJSZE7YQHIAACAACOFBW65LSONSSAQ3SMVSGK3TUNFQWYBA2NFLDPEDENZQW2ZLPIVWW2YJAJJQW4ZJAKRQXG3LBMRRW6ZDFMZEFGLRSG44HCY3FOJ2GSZTJMNQXI2LPNZHGC3LFOJLW64TLNFXGOIDBOQQEQZLJM5UHI43SMNSXE5DJMZUWGYLUNFXW4TDFOZSWYZ2MMV3GK3BAGRVGS43TOVSXETTBNVSXQGCBMR3GC3TDMVSCAU3BMZSXI6JAKRZGC2LONFXGOZTFPBYGS4TZNIZDAMRWFUYDCLJQGE5AAAIAACRAEAYDPB2WQ5DUOBZTULZPNRSWC4TOFZ3GS2JOMF2TAMJONVQXI5DSFZTWY33CMFWC6Y3POJSS65RSF5RXEZLEMVXHI2LBNRZS6Y3PNVYGCY3UF5ZGK5TPMNQXI2LPNYWWY2LTORZS6OBYG5RWIMJUGAWWKNDEG4WTINJRHAWWENZQMYWTGMBVMIZDGNZXHA4DIOAH3BAFA3FHFPDIRRKK4SM3ZDTKQSRCPRCYIA7RFUZYQI3RIGDHIGLAODJ6K2F245DTLIIKXAD35TORFQ7MVRJCIEPH6SC6NGA4HRMK76H5V6GXP66FFNX7MNYC6MYVU7ZLLXYVLXBU",
3 "width": 800
4}
payload
: Use theencoded
element from the response obtained when creating the Compact Credential.width
: Optionally specify the desired width of the output QR code. When no width is specified MATTR VII will generate a QR code with an optimised width based on the size of the payload. Maximal value is 1000px.
Response
The response include a QR code as a PNG file. This QR code contains the encoded credential.
If the provided payload is invalid, the API will return an error:
400:
Payload is not a string.
Payload does not match a Compact Credential profile.
Generated QR code is larger than the provided width.
413:
The payload is too large to be stored in a QR code.
What's next?
Now that you have the credential formatted as a QR code, you can share it using your selected communication channel (e.g. e-mail, messaging platform, etc.).