Invalid Signature while join a meeting in SDK

This is my Signature created for joining meeting but it was saying that signature is invalid

My Signature -
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZGtLZXkiOiI1SU5pcWhsR1F5eWFUNFhDRzR0c19BIiwibW4iOiIxMjM0NTY3ODkiLCJyb2xlIjowLCJpYXQiOjE3MTUxNTYxMzUuMCwiZXhwIjoxNzE1MzI4OTM1LjAsImFwcEtleSI6IjVJTmlxaGxHUXl5YVQ0WENHNHRzX0EiLCJ0b2tlbkV4cCI6MTcxNTE5MjEzNS4wfQ.uNRtY7525TsJ3-2WkIs98rYbN9LpQFKQ45pwnui_cqY

My Script in Python:

import jwt
import time
def generateSignature(data,secret):
    encoded_jwt = jwt.encode(data, secret, algorithm="HS256")
    return (encoded_jwt);
if __name__ == '__main__':
    epoch_time = int(time.time())
    epoch_time_48hours_later=epoch_time+172800
    CLIENT_SECRET="redacted"
    CLIENT_ID="5INiqhlGQyyaT4XCG4ts_A"
    data = { "appKey": CLIENT_ID,
             "iat": epoch_time, 
             "exp": epoch_time_48hours_later, 
             "tokenExp": epoch_time_48hours_later,
             "mn":123412341234,
            "role":1,
            "sdkKey": CLIENT_ID
             
            }
    print (generateSignature(data,CLIENT_SECRET))

@healplace the sample which you have share does not have the same value as what is generated from the code.

Some possible issues and rectification:

  • Try with role:0 first,
    -Secondly, make sure that your tokenEXP is the same as exp, the sample is showing tokenEXP = iat.
  • Lastly, try it out with a meeting number which is created with an internal user.

@chunsiong.zoom still i am getting same issue

can you give me some solution on this

@healplace I’ll PM you for some details

New Meeting ID - 89817863912
New signature - eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcHBLZXkiOiJ4Q1o3b0FiaFQwbTNTRHBPWXVXTDVRIiwiaWF0IjoxNzE2MTg3ODA3LCJleHAiOjE3MTYzNzc4MDcsInRva2VuRXhwIjoxNzE2Mzc3ODA3LCJtbiI6ODk4MTc4NjM5MTIsInJvbGUiOjAsInNka0tleSI6InhDWjdvQWJoVDBtM1NEcE9ZdVdMNVEifQ.1iuXiu9s-37sQknkLdmAzzGQ5eKSNAMo0nyuLzu7oA8

@healplace for a start,

the iat and exp cannot be more than 48 hours. Yours has slightly exceeded 48 hours.