encapsulate version and access_token inside getAPIURL and add HTTPS variable