edklesel / Email-Breach-Checker

Daily process which makes requests to the HaveIBeenPwned API to check for email account breaches
1 stars 0 forks source link

Getting 403 response from API #13

Closed edklesel closed 6 years ago

edklesel commented 6 years ago

Making requests for some reason is now resulting in a 403 response. API documentation states that this is because a user-agent has not been specified. This will need to be included in the get requests. See below documentation for details:

edklesel commented 6 years ago

IF I change VPN to get a new IP (I think my main one has been banned for 24h) then it works. I'll wait till tomorrow to commit, so I can test once my ban expires.

edklesel commented 6 years ago

Adding in a user agent fixed the 403. I'll add it into the config instead of hard-coding it.

edklesel commented 6 years ago

Added user agent to request, fixed issue.