Hey guys,
I'm implementing the chatbot on iOS through webview. Chat works fine, but user info is not coming through, I add email and id as query params, resulting in URL such as:
https://widget.yourgpt.ai/[email protected]&CONTACT.ext_user_id=uuid&user_hash=hash
@Sahil should this work?
Thanks for the reply Sahil, yes I believe so. It's implemented as suggested by the chatbot:
private func generateHMAC(data: String, secret: String) -> String {
let secretData = Data(secret.utf8)
let dataToHash = Data(data.utf8)
let signature = HMAC<SHA256>.authenticationCode(for: dataToHash, using: SymmetricKey(data: secretData))
return Data(signature).map { String(format: "%02hhx", $0) }.joined()
}
Do you see any issues here?
hello @Ivan This is the documentation for the identity verification process: https://docs.yourgpt.ai/chatbot/customization/sdk/identity-verification/
Have you tried using the $yourgptChatbot method? I’m checking your use case by passing it in the URL to see if verification can be done that way. I’ll update you meanwhile — if you can try using the YourGPT method and see if that works.
hello @Ivan We’ve added hash support in the URL. Please check now — if the hash validates as true and is generated according to the documentation we shared, it should correctly store the email as a contact in the system
Sample:
https://widget.yourgpt.ai/<widget_uid>?CONTACT.email=<[email protected]>&CONTACT.ext_user_id=<user_id>&CONTACT.name=<user_name>&user_hash=<hmac_hash>
Hey Sahil,
unfortunately, it still doesn't work with me.
It would be enough for us if only email was logged.
But if hash is always required, how can I validate that it's correct?
You can debug by filtering the logs based on my test email: [email protected]
I’m seeing some contacts being registered in Dashboard > Project > Contacts that include external_ids and session info. Can you confirm whether you’re able to verify those contacts? Also — if you’re testing with test emails, note that our system does not allow test emails to bypass the valid-email checks. Allowing test emails or duplicate addresses makes the leads data unreliable. Please test using real email addresses that do not already exist in the system.
I tested your bot with one conversation. Could you check if this email was registered in your dashboard?