Was having this problem for days.
Now I can use origin perfectly.
If it still does not work,
try disabling your Windows Firewall, Defender and anti-virus.
It should fix the prob.
This download link worked perfectly for my windows 7 PC!!! after worthlessly messing around with compatibility settings for 45 mins to no avail as EA customer support suggested, i tried this forum link and thank goodness i did, im on and playing apex legends right now