Country calling code
The 1-3 digit prefix that routes a number to its country, such as +1 for the United States and Canada, +49 for Germany, +81 for Japan.
Country calling codes are assigned internationally and shared by every number in a country. Some are shared between countries, since +1 covers the United States, Canada and much of the Caribbean, and +7 covers both Russia and Kazakhstan.
Platforms read the code to infer where a user is, which is why some sign-ups demand a local prefix and refuse foreign ones.
Why the shorter codes belong to bigger networks
Codes were allocated by zone, with single-digit codes going to the largest numbering areas and longer codes to smaller countries. That is why the United States has +1 and Hong Kong has +852.
A shared code means the code alone does not identify the country. Systems tell a Canadian number from a United States one by the area code that follows, which is also how a service that serves only one of them decides whether to accept you.
Renting a code, in practice
Choosing a country when renting a number is mostly about the prefix a service checks first. A local marketplace that only serves Germany looks for +49 before anything else.
Pick the country the service expects rather than the one you are sitting in. The countries page lists what is available with the dial code for each.
Codes shared between countries
Some codes cover a group rather than one country. The +1 code spans the United States, Canada and around twenty Caribbean territories, and +7 covers both Russia and Kazakhstan.
Systems separate them using the digits that follow, so a service that accepts Canada but not the United States reads the area code rather than the country code. That is also why a form can accept your number and a later check can still place you in the wrong country.