Legacy Dev Forum Posts

 View Only

Sign Up

AudioHook HTTP Signature Verification Failing

  • 1.  AudioHook HTTP Signature Verification Failing

    Posted 06-05-2025 19:02

    aditya.patange1 | 2023-04-19 12:07:33 UTC | #1

    I have integrated with Genesys AudioHooks and am facing difficulties in verifying HTTP signatures (the computed signature does not match the expected signature) for incoming audio streams as given in the Genesys documentation.

    I have implemented the signature verification algorithm in NodeJS as per the Signing HTTP Messages specification provided in the docs.

    As an example, I have tried computing the signature for the example given in the Genesys docs but the signature hash does not match.

    This is the link to my code: https://gist.github.com/AdityaPatangeProdigal/849be39d612bf248f1dabfcfb336fb1f

    This is the generated signing string:

    "@request-target": /api/v1/voicebiometrics/ws "@authority": audiohook.example.com "audiohook-organization-id": d7934305-0972-4844-938e-9060eef73d05 "audiohook-session-id": e160e428-53e2-487c-977d-96989bf5c99d "audiohook-correlation-id": 30b0e395-84d3-4570-ac13-9a62d8f514c0 "x-api-key": SGVsbG8sIEkgYW0gdGhlIEFQSSBrZXkh "@signature-params": sig1=("@request-target" "@authority" "audiohook-organization-id" "audiohook-session-id" "audiohook-correlation-id" "x-api-key");keyid="SGVsbG8sIEkgYW0gdGhlIEFQSSBrZXkh";nonce="VGhpc0lzQVVuaXF1ZU5vbmNl";alg="hmac-sha256";created=1641013200;expires=3282026430

    This is the computed vs expected hash.

    computedSignature: 'NzEX+susxwmO0Rh6sE6HoB+oOcLSx701vhPSkkCujyE=' expectedSignature: 'NZBwyBHRRyRoeLqy1IzOa9VYBuI8TgMFt2GRDkDuJh4='

    Would appreciate any help / pointers on what could be going wrong!

    Thank you.


    Camiel_Coppelmans | 2023-04-28 12:47:00 UTC | #2

    Hi Aditya,

    There is a mistake in our documentation which was pointed out by another partner haven similar issues. We haven't had the time to fix the mistake yet. Basically, the values of the audiohook-session-id and audiohook-correlation-id are mixed up. Could you please try with the following:

    "audiohook-session-id": 30b0e395-84d3-4570-ac13-9a62d8f514c0 "audiohook-correlation-id": e160e428-53e2-487c-977d-96989bf5c99d

    Thanks, Camiel


    aditya.patange1 | 2023-04-30 19:20:17 UTC | #3

    Hi @Camiel_Coppelmans,

    I swapped the ids as you mentioned but the signatures are still not matching.

    computedSignature: 'gI+MSUhA8esUHDnXTve6OCkgg5QLtFAC9b6+jbkiKxo=' expectedSignature: 'NZBwyBHRRyRoeLqy1IzOa9VYBuI8TgMFt2GRDkDuJh4='

    Signing string:

    "@request-target": /api/v1/voicebiometrics/ws "@authority": audiohook.example.com "audiohook-organization-id": d7934305-0972-4844-938e-9060eef73d05 "audiohook-session-id": 30b0e395-84d3-4570-ac13-9a62d8f514c0 "audiohook-correlation-id": e160e428-53e2-487c-977d-96989bf5c99d "x-api-key": SGVsbG8sIEkgYW0gdGhlIEFQSSBrZXkh "@signature-params": sig1=("@request-target" "@authority" "audiohook-organization-id" "audiohook-session-id" "audiohook-correlation-id" "x-api-key");keyid="SGVsbG8sIEkgYW0gdGhlIEFQSSBrZXkh";nonce="VGhpc0lzQVVuaXF1ZU5vbmNl";alg="hmac-sha256";created=1641013200;expires=3282026430


    Camiel_Coppelmans | 2023-05-01 20:18:43 UTC | #4

    Hi @aditya.patange1,

    Do you have access to our reference code? We have a reference implementation of an audiohook server in node.js. I need a GitHub user in order to give you access to it.

    Maybe by comparing our reference code with yours you might be able to spot something.

    Thanks, Camiel


    aditya.patange1 | 2023-05-05 06:08:29 UTC | #6

    @Camiel_Coppelmans ,

    Sure, I can compare the code and find out what's going wrong.

    Github: AdityaPatangeProdigal


    Camiel_Coppelmans | 2023-05-05 12:35:27 UTC | #7

    @aditya.patange1,

    I added you as a member of this repo: https://github.com/felixwyss-genesys/audiohook-fargate

    You should receive an email soon. This repo has a server reference code as well as a client tool you can use to test your own server.

    Let me know if you have questions.

    Thanks, Camiel


    alef | 2023-05-10 18:48:15 UTC | #8

    @Camiel_Coppelmans

    I'm in the same situation but with java. Could I also get access to the repo to view the reference code and the client tool? My public GH repo is https://github.com/alejandro-flores

    Thank you!


    Camiel_Coppelmans | 2023-05-10 19:26:04 UTC | #9

    Sure, Just added you as a member of the repo.

    Thanks, Camiel


    system | 2023-06-10 19:26:58 UTC | #10

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 19540