Skip to content
Vedad Kirlić edited this page Dec 30, 2021 · 1 revision

Syncing a user library

We can use this endpoint to trigger a sync on a user's digi.me to update with latest data. This means:

  • Importing any new data from services they have already connected to.
  • Importing any new data they have in their postbox to their digi.me.

In order to trigger a sync, the data query request needs to be sent with a valid access_token and sessionKey wrapped within an JWT included in the Authorization HTTP request header - as shown below.

POST /v1.6/permission-access/trigger

Request Header

Parameter Required Description Type
Accept Yes The content types, expressed as MIME types, the client is able to understand. Use application/json. string
Authorization Yes Authentication type. Use Bearer and a JWT token. The JWT should be a string in the format xxxxx.yyyyy.zzzzz. Learn more about JWT creation. string

The payload for the Authorization JWT string:

{
  "access_token": <access_token>,
  "client_id": <appId_contractId>,
  "nonce": <^[a-zA-Z0-9]{32}$>,
  "redirect_uri": <registered_redirect_uri>,
  "session_key": <session_key>,
  "timestamp": <current_unix_time>
}
Property Required Description Data type
access_token Yes A valid access token. string
client_id Yes A string consisting of the application ID and contract ID separated by an underscore. ie appId_contractId. string
nonce Yes A 32-char string made up of random alphanumeric characters. string
redirect_uri Yes The redirect URL that's been registered to your digi.me contract. string
session_key Yes A valid session key. string
timestamp Yes Unix timestamp in seconds. number

Sample Request

curl --location --request POST 'https://api.digi.me/v1.6/permission-access/trigger' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJQUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NfdG9rZW4iOiIzOGIwMmYyMDVmM2ZiNjE2MTVhNGMxZTI1ZDllMjA3ZDI2YjZlYzBlNjMxZmZlM2Y4N2FmYTRlMmU2NGE4YWYyZTNmMjgyNDdiM2I5ZDc4NmY1ZjM5ZGRmZTRkNGQ0MzVmMTUyN2I4NGYzZTVmMGVlOTlmYmU2YzM1ODg1MDkwZTE3NGU3YjdiMmY1MzVhOGJjMWU2NjA3NTczODNhMDVkIiwiY2xpZW50X2lkIjoiSUw3YVBZV082RFVhVTlrZ1k3WndIcFYxRzdBZUJIUVRfcVlmakdpMEZnWmNNcGtaanpGUTFuejV1N1RYOWxGY1kiLCJub25jZSI6ImhvVW9wcmE3Uk9SZUNsTXk5UENjbjNmZjZEQ2g2eW5RIiwicmVkaXJlY3RfdXJpIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgxL2N5Y2xpYy1yZXN1bHRzIiwic2Vzc2lvbl9rZXkiOiJ3d1EwNjh2SVN6dDhRblFjd3ZUZUtQODBlSWdBV1VXUCIsInRpbWVzdGFtcCI6MTYwNDkxNjk0MjI1Mn0.YU1ExzqTSX4Amby5vnLpCMfp7Uk7JaMEiUTGG7OjkHP9NFPWN-oNiJmsLnkTnl7UGzaqHhHu9wdRGctwo_pt2Em_E1HEOugstuoQuTYUchYMs9-DrzX2VQVL6IV8Q_XEycOw_MT2TivJtvdk1jzGKglSSJLKY15gZS2T9cTxt-qOVFyIB_Ga8D81u1Ygpr9ybRsVqJzs8D3fWb_1J3kkuILAx5fGfHUrIUijRexVKMwv85wimq7Up_jqoMf3UKsfxpaQYUbpSp9tL__WszO6Mhnb_xp2plRcDrzjsxIH8QwQ-SBxIf-ScCFSXwhoEnrKWND8zBGQo8rwxo2tfOdsog'

Success Response

202 Accepted

Response Errors

Subject to Application, Contract, General and OAuth related errors.

Clone this wiki locally