https://retellai.com/?utm_source=discord&utm_medium=seo logo
'Retell' object has no attribute 'verify'
# ❓・bug-report
s
We've started getting this error after upgrade to python retell-sdk 5.7.0. Is anybody else experiencing this? Here is a sample code: retell = Retell(api_key=API_KEY) async def has_valid_retell_signature(request: Request) -> bool: payload = await request.body() payload_str = payload.decode('utf-8') # Type cast to handle retell-sdk's lack of type annotations # The verify method returns False on failure, or a truthy value on success valid_signature: bool = cast(bool, retell.verify( payload_str, api_key=API_KEY, signature=str(request.headers.get('X-Retell-Signature')) ) ) return valid_signature
s
Hey @Stan You can fix this by calling retell.verify(payload_str, signature=...) without passing api_key.
m
@Shehroze -Support @Retell looking at the retell SDK code, it's impossible for the verify property to be initialized to anything, as the supposed initialization got dropped from the constructor after the return statement in an unrelated function: https://github.com/RetellAI/retell-python-sdk/blob/main/src/retell/_client.py#L206 .
c
@Shehroze -Support @Retell , any updates on this issue?
@Shah - support @ Retell AI , do you mind looking at this? The proposed fix doesn't work
s
Ok i check
c
Any updates? We need to update the SDK and we have been stuck with these issue for days
@Shah - support @ Retell AI @Shehroze -Support @Retell any news? The latest SDK versions seems to be broken and the support has been non-existant
s
Sorry no update have you tried this from retell import Retell retell = Retell(api_key=API_KEY) @app.post("/webhook") async def handle_webhook(request: Request): post_data = await request.json() valid_signature = retell.verify( json.dumps(post_data, separators=(",", ":"), ensure_ascii=False), api_key=str(API_KEY), signature=str(request.headers.get("X-Retell-Signature")), ) return valid_signature
a
Hey @Shah - support @ Retell AI, we are getting the same error - we tried your solution and we are getting the identical error ie) .verify() doesn't work. Is there any update on this issue?
s
no update yet
z
Hi there this seems to be an error due to our SDK library, I have escalated to the library company, thank you for reporting! It should be resolved in a few days
Hi the bug has been fixed, you can upgrade to the latest Python SDK.
Thank you so much for reporting the issue.
c
Thank you for the fix @Zhongmiao Li