Checking if user_id and api_key are sent