Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question S2S callback signatures mismatch

Discussion in 'Unity Mediation' started by leonecaramanica, May 6, 2022.

  1. leonecaramanica

    leonecaramanica

    Joined:
    Mar 7, 2018
    Posts:
    2
    The signature received in the callback does not coincide with the one recreated!
    The params that I receive are: customizedData, eventId, timestamp, userId, signature (like this):
    .../test.php?customizedData=%7B%22game%22%3A%22sudoblock%22%7D&eventId=60230082-a1f2-42ce-9159-703b38dfb734&timestamp=1651775611&userId=123456&signature=744baef2fd00c440108897fh309d7a90


    I generate the string to hash in this way as described in the documentation:
    "eventId,timestamp,userId"     --->       "60230082-a1f2-42ce-9159-703b38dfb734,1651775611,123456"


    The secret key generated in the Unity Dashboard for hashing is in this format:
    84e7d31e-7n14-452b-abd9-781du4229e10


    And that's the PHP code to generate the signature:
    hash_hmac ('md5', $stringToHash, $secretKey);


    I tried any different combination but is not working, the received signature is different from the recreated one...
     
  2. unity_4SBGFALof1Fcpw

    unity_4SBGFALof1Fcpw

    Unity Technologies

    Joined:
    Oct 1, 2020
    Posts:
    4
    are you still experiencing this issue?
     
  3. unity_4SBGFALof1Fcpw

    unity_4SBGFALof1Fcpw

    Unity Technologies

    Joined:
    Oct 1, 2020
    Posts:
    4
    could you provide the game id and when did you experience this issue so i can look into the logs to find out more information?
     
  4. unity_4SBGFALof1Fcpw

    unity_4SBGFALof1Fcpw

    Unity Technologies

    Joined:
    Oct 1, 2020
    Posts:
    4
    also have you tried regenerating the secret to see if that helps solve the issue?
     
  5. leonecaramanica

    leonecaramanica

    Joined:
    Mar 7, 2018
    Posts:
    2
    I tried regenerating the secret key again and everything seems working atm!
     
    jonathan_rene and jcGrenier like this.