def get_ams_access_token(accountname, accountkey):
accountkey_encoded = urllib.parse.quote(accountkey, safe='<STR_LIT>')<EOL>body = "<STR_LIT>" + accountname +"<STR_LIT>" + accountkey_encoded + "<STR_LIT>"<EOL>return do_ams_auth(ams_auth_endpoint, body)<EOL>
Get Media Services Authentication Token.

    Args:
        accountname (str): Azure Media Services account name.
        accountkey (str): Azure Media Services Key.

    Returns:
        HTTP response. JSON body.