Endonym (also autonym "self name") is a Greek/English word for a name that a people or country calls themselves or their language. Exonym (also xenonym "foreign name") is a Greek/English word for the opposite, or what a stranger would call someone else's country, people or language. Endonym means "inside name"; while exonym means "outside name".
Source: tatoeba (11746169)
Recognizing that measures such as the categorization of exonym use, the publication of pronunciation guides for endonyms, and the formulation of guidelines ensuring a politically sensitive use of exonyms would help in the reduction of the number of exonyms, […]
Source: wiktionary
“Mandarin” is what linguists call an exonym, an external name for a place, people, or language. And exonyms often tell of a history of how cultures met, fought, and interacted.
Source: wiktionary