Unable to create consent due to Invalid Digest Header

2 posts / 0 new
Last post
truelayer
Unable to create consent due to Invalid Digest Header

Hi,

I'm facing some issues while creating a consent in the prod environment. The error I get is:

{"transactionStatus":"RJCT","tppMessages":[{"category":"ERROR","code":"BAD_REQUEST","text":"Invalid Digest Header."}]}

Would you please help me understand what's wrong with the request? Thank you so much. Request details below:

Method: POST,
RequestUri: 'https://site1.sibsapimarket.com/sibs/apimarket/BNKI/v1-0-3/consents'
Headers:
{
  Accept: application/json
  Date: 2022-07-17T09:21:50.4585004Z
  Signature: keyId="--OMITTED--**",algorithm="rsa-sha256",headers="Digest TPP-Transaction-ID TPP-Request-ID Date",signature="--OMITTED--"
  TPP-Certificate: --OMITTED--
  Digest: SHA-256=+Pkt9Fw09Nd680wllrcD+wYBJe6UbVYzgwMA+SnVRC4=
  TPP-Request-ID: 50dd8dd7-7c38-4630-aeee-03f791243aaa
  TPP-Transaction-ID: 26f8c507-c72f-492f-acbb-4bda56178323
  X-IBM-Client-Id: --OMITTED--
  Content-Type: application/json; charset=utf-8
}

**KeyId is the certificate serial number made of 32 digits.

Request Body:

{"access":{"accounts":[],"allPsd2":"allAccounts"},"combinedServiceIndicator":false,"recurringIndicator":true,"validUntil":"2022-10-15T09:21:50.4319760\u002B00:00","frequencyPerDay":4}

Signing string:

digest: SHA-256=+Pkt9Fw09Nd680wllrcD+wYBJe6UbVYzgwMA+SnVRC4=
tpp-transaction-id: 26f8c507-c72f-492f-acbb-4bda56178323
tpp-request-id: 50dd8dd7-7c38-4630-aeee-03f791243aaa
date: 2022-07-17T09:21:50.4585004Z
truelayer
Solved

For anyone interested, this was caused by an invalid "validUntil" parameter, that contains unicode chars (\u002B). Replacing it with a more standard format, like "2022-10-16T09:21:50:00Z", solved the issue.

Furthermore, I also had to provide the "TPP-Redirect-URI" header which appears to be mandatory, but the documentation says it's optional.

Cheers.

Log in to post comments