UnboundLocalError: local variable 'response' referenced before assignment

Yeah, wrong URL. You’re missing the “api.” after “https”.