Code for checking the authorization info required for API access