Set API credentials in global variables