I have built an android app with your backendless api. I’m using user service api for user registration where I require the user to confirm his/her email for registration.
However, when someone clicks on the link in the received email an error is encountered.
I personally test this and I got this error:
{“code”:8002,“message”:“Could not parse request with message: , status code 404, headers GET /api/B952A98C-3AF8-0E07-FF8A-0E72F029D000/305A9BD1-5CD1-4579-A4FD-F55A3B73E50A/users/confirmation”,“errorData”:{}}
link was (my custom domain: back.persmanga.com):
http://back.persmanga.com/api/B952A98C-3AF8-0E07-FF8A-0E72F029D000/305A9BD1-5CD1-4579-A4FD-F55A3B73E50A/users/confirmation
Email confirmation was working before and I didin’t change anything. I’m wondering why it’s not working now. I tested further and it seems that the link should not have “/api/” part in the path:
http://back.persmanga.com/B952A98C-3AF8-0E07-FF8A-0E72F029D000/305A9BD1-5CD1-4579-A4FD-F55A3B73E50A/users/confirmation
Regards,
Hello, @Amir_Sarraf .
We were able to reproduce your problem.
The internal ticket BKNDLSS-20225 is created, we will let you know about solution.
Regards,
Inna
Hi @Amir_Sarraf,
I noticed the custom domain mapped to your application is back.persmaga.ir (and not back.persmaga.com). I registered myself as a test user to see if I can reproduce the problem, however, the email has not arrived yet. I see you’re using your own email server. Could you please check if an email to mpiller@gmail.com has been sent?
Regards,
Mark
thanks for your support. maybe it’s in your spam folder because my email service says it’s delivered.
I deleted your account so you could test it again.
Hello @Amir_Sarraf
The issue with status code 404
has been fixed.
But there is another problem somewhere on your side
I just register a new user in your app and got an confirmation email with link
link text:
http://back.persmanga.ir/api/B952A98C-3AF8-0E07-FF8A-0E72F029D000/9241A3CE-90FF-4973-AD03-10F58D178B44/users/confirmation
link url:
https://u9007462.ct.sendgrid.net/wf/click?upn=Ea8SEQhntJQO9RPQfrT8fJvJj45gkcpCcger-2Ft2zi3bR-2BF0CpqZJ-2FAkZPljmaz1YpF5pZ3xK-2BJfLDclNlSpr2k-2Be8U1MOrMFP0pkiX2BHC5lGAAIH9LjkG-2Fj6GTAe3SZCYXXGQtS2bAbGvUBT2qQyK5TXQLbONYxTSxEJ21jV1sMBTJTr6UfA9u-2B103VUR8kXdm5rVtEISEFdJbJmpI9NDOWctwj0DMTjFRUNTeL0lgLml-2Bz6mxXJuMiVTsIb-2F2dhJYR-2FOyZGD2zqyvvuE8mDOqt08vk0p8WfCNOQ91wWw4Ee-2BMPzfGwiQgVJ1YlRXezkYoCDHUxLRJkDO-2BmMVoV40qos-2BwKBUEJW5a8X7iMZBmpSFwfBtbkM8NUYN2CGtwgx-2FIloJUvuZmRqd-2F-2BNIQlSSFknarmr2jRYfykn85qNbTL2iNu0L4RlawidcbWMNkCnyTINT2t-2Fvbc1vo-2FpTg6ouqIa1U7o28OwlDAPaOS1bFk5CF4TsyMxLcv2Eh0vj-2BRRy527CsBY1vn5w7ChDXOGL5moeQ2VJRARcueswv-2BI-2FgHVNYzAyIY93gncqDTbQcJ40tWWRDvNlsh1oWjOcCrTzTZA3G95NPmmkSdQoareFAm3RnhM0AdA9cbdHuhpdmKMDaX6B887klUSmOIrI9a1Q7WS-2FKqCpsSefJx9kutwar977kgxQzalQWOvZbo4gdONLtZl-2Bkps4ex2Jq1pO3CBw-3D-3D_6Z9BSmmOrltQsaNcyxc7N9b35VF5EjwPyIzzw2Ma1mM6sqJpw1ImIobWRwzmOa2PUSSfQdYxAXJhOWA2F-2B5GZi6KC49j9U5gCuZfrieDcnVb1miJbDx7o-2BYLC-2B74Xuk3Fg-2BPbs8ewhzlr0JFnSce7TYslSGWTd-2FZ2TFok-2BGuM-2BAhv5jM-2F2-2BC95iLAXvNWxFkTWvV7WuJgWNVPC3r-2BcuYAyeiLICG67srdCG4dNkfBSDGgC9v0NIF9rHfR10qbrtG
on click at this url you are redirected twice
the end location is:
http://back.persmanga.ir/api/B952A98C-3AF8-0E07-FF8A-0E72F029D000/305A9BD1-5CD1-4579-A4FD-F55A3B73E50A/users/confirmation
as you can see the confirmation key must be 9241A3CE-90FF-4973-AD03-10F58D178B44
but it is 305A9BD1-5CD1-4579-A4FD-F55A3B73E50A
btw, this is exactly the same url as you have at the top of this topic
So, I guess there maybe some kind of cache, could you check it please.
If you just copy the url (text) and paste into web browser the email will be confirmed.
Regards, Vlad
Thanks, Great work!
The problem seems to be solved!
I’ll check sendgrid settings and inform you about the result.
Regarding this issue for email confirmation, I had to run my own smtp server and I get rid off that Sendgrid smtp server.
Still, when I use email confirmation, the generated link would redirect the user through Sendgrid server.
For example:
Actual link (correct one):
http://back.persmanga.ir/api/B952A98C-3AF8-0E07-FF8A-0E72F029D000/5810DCB8-F4BE-4CA5-90D3-7008CE7D3373/users/confirmation
Link displayed to the user:
href=“https://u9007462.ct.sendgrid.net/wf/click?upn=J8UPjv9i1LzXXI5CoqkqPn1Scr-2F1b3QlmciYGzVWc-2Bk-2B6Yjl-2FUz1YKroI60kt3-2FFSF7SFZQffo9qRqaV4o1OT98SKniA-2BAVJHPckgnTGkJ-2FJn7k-2FQjwDbbk63oeMXybh4P4MN8SZNy-2FrbJSl5qsfl5cEfAO4t4SMrnCDU-2B3wPHm80tX7-2BRu2XM693pkMlRdE_nE5lu78V9XGAIFhFSUEqeSO8a-2FdvR8wRp2nfWYQRtQy2XnbXmW2-2F2DiFRG1JwSu-2FD7UOGqhL6F1zAAMH720Zq8a8wGtdoPh104exG14Kl-2BvM4vVCr7xza7pY53BlvRsnL6ZAE-2BEGWgYIyRSSS3VNKRbm55v2fqULkVB0l34j-2BZivhuCWzjyu3klOYbaLa-2F76Bulh7a2L-2F8B6ICUFtxj2o1m92TJzrUlCnh3lS4FVC5ZCZIPr2L2VKwygZHQFRsng”
which uses Sendgrid.
Do you use Sendgrid for link generation. I don’t know where that comes from. Email confirmation always fails by clicking the link because it’s routed through Sendgrid and the same address is always reached which is:
http://back.persmanga.ir/api/B952A98C-3AF8-0E07-FF8A-0E72F029D000/305A9BD1-5CD1-4579-A4FD-F55A3B73E50A/users/confirmation
here is my smtp log:
Jun 3 14:14:10 ubuntu-19-dnd postfix/submissio/smtpd[19704]: connect from backendless.com[66.114.116.4]
Jun 3 14:14:11 ubuntu-19-dnd postfix/submissio/smtpd[19704]: 478EB402B4: client=backendless.com[66.114.116.4], sasl_method=LOGIN, sasl_username=info
Jun 3 14:14:11 ubuntu-19-dnd postfix/cleanup[19709]: 478EB402B4: message-id=198328533.41.1591186450694@bl-taskman-7f96c8c655-6m4jl
Jun 3 14:14:11 ubuntu-19-dnd postfix/qmgr[19683]: 478EB402B4: from=info@persmanga.ir, size=3203, nrcpt=1 (queue active)
Jun 3 14:14:11 ubuntu-19-dnd postfix/submissio/smtpd[19704]: disconnect from backendless.com[66.114.116.4] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
Jun 3 14:14:17 ubuntu-19-dnd postfix/smtp[19710]: 478EB402B4: to=amirms2001m@yahoo.com, relay=mta7.am0.yahoodns.net[98.136.96.77]:25, delay=6.6, delays=0.16/0.02/0.3/6.2, dsn=2.0.0, status=sent (250 ok dirdel)
Jun 3 14:14:17 ubuntu-19-dnd postfix/qmgr[19683]: 478EB402B4: removed
Hi @Amir_Sarraf,
We’ll take a look and back to you as soon as possible.
Best regards,
Yevgen
@Amir_Sarraf,
Please, check variable {confirmation_url} in your “Confirmation template” (Messaging > Emails).
Best regards,
Yevgen
Hello @Amir_Sarraf
I guess Sendgrid wraps all the links in emails for tracking clicks
Regards, Vlad
yea, but i don’t use Sendgrid anymore; however, I still see Sendgrid is wrapping my links!?
@Amir_Sarraf,
this url is hardcoded in variable {confirmation_url} in your “Confirmation template”. Please, edit the variable and add another value that you need.
I finally figured it out. {confirmation_url} was set to a fixed value.
after enabling/disabling the email confirmation, it worked.
Many thanks!