NATION

PASSWORD

NationStates API (nationdata/regiondata)

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.

Advertisement

Remove ads

User avatar
New Rogernomics
Powerbroker
 
Posts: 9067
Founded: Aug 22, 2006
Left-wing Utopia

Postby New Rogernomics » Mon Sep 02, 2019 9:31 am

Hey there, I have a two part question, if this is the right place to ask this.

I have been learning more about how the Nationstates Telegram API is implemented, and I have a question concerning this.

If a nation is a founder in a UCR, or the delegate of a GCR, and they allow nation X to get the API key for recruiting, and nation X CTEs, does that only API key become open to nation Y to acquire the key?

Holds silly opinions on some things, and likes animals of all kinds, including the scary ones.
Pro: Individualism, Humanism, Human Rights, Internationalism & Free Markets, Democracy, Decentralization, and Treaty of Sèvres.
Against: Social Conservatism, Religious Extremism, Extreme Nationalism, Racism, Homo/Trans phobia, Authoritarianism.

User avatar
Phydios
Minister
 
Posts: 2198
Founded: Dec 06, 2014
New York Times Democracy

Postby Phydios » Mon Sep 02, 2019 10:06 am

New Rogernomics wrote:Hey there, I have a two part question, if this is the right place to ask this.

I have been learning more about how the Nationstates Telegram API is implemented, and I have a question concerning this.

If a nation is a founder in a UCR, or the delegate of a GCR, and they allow nation X to get the API key for recruiting, and nation X CTEs, does that only API key become open to nation Y to acquire the key?

API keys are issued per region, so they aren't locked to a specific nation. Nation Y can use the key any time that no one else is using it.
Romans 1:18-2:29, Ephesians 2:1-10
But God’s angry displeasure erupts as acts of human mistrust and wrongdoing and lying accumulate, as people try to put a shroud over truth. But the basic reality of God is plain enough. Open your eyes and there it is! | Those people are on a dark spiral downward. But if you think that leaves you on the high ground where you can point your finger at others, think again. Every time you criticize someone, you condemn yourself. | It’s a wonder God didn’t lose His temper and do away with the whole lot of us. Instead, immense in mercy and with an incredible love, He embraced us. He took our sin-dead lives and made us alive in Christ. He did all this on His own, with no help from us!

User avatar
New Rogernomics
Powerbroker
 
Posts: 9067
Founded: Aug 22, 2006
Left-wing Utopia

Postby New Rogernomics » Mon Sep 02, 2019 4:40 pm

Phydios wrote:
New Rogernomics wrote:Hey there, I have a two part question, if this is the right place to ask this.

I have been learning more about how the Nationstates Telegram API is implemented, and I have a question concerning this.

If a nation is a founder in a UCR, or the delegate of a GCR, and they allow nation X to get the API key for recruiting, and nation X CTEs, does that only API key become open to nation Y to acquire the key?

API keys are issued per region, so they aren't locked to a specific nation. Nation Y can use the key any time that no one else is using it.
That is not correct apparently. There is only one key per region. If you don't know the key or have access to it, then no other nation can use it. A good example would be where a regional officer nation or a founder acquires the key, and then CTEs.
Last edited by New Rogernomics on Mon Sep 02, 2019 4:42 pm, edited 1 time in total.

Holds silly opinions on some things, and likes animals of all kinds, including the scary ones.
Pro: Individualism, Humanism, Human Rights, Internationalism & Free Markets, Democracy, Decentralization, and Treaty of Sèvres.
Against: Social Conservatism, Religious Extremism, Extreme Nationalism, Racism, Homo/Trans phobia, Authoritarianism.

User avatar
Frisbeeteria
Senior Game Moderator
 
Posts: 23860
Founded: Dec 16, 2003
Anarchy

Postby Frisbeeteria » Mon Sep 02, 2019 5:18 pm

Phydios wrote:API keys are issued per region, so they aren't locked to a specific nation. Nation Y can use the key any time that no one else is using it.

There's a lot wrong with this statement. Keys are tied to a region, but a single nation is considered 'responsible' for it. If another nation misuses the key, the responsible nation could get a warning. Sharing a key requires a fair bit of trust.

Also, "any time that no one else is using it" is misleading. Multiple nations can use the same key simultaneously - it's just pointless. The rate limit applies to the key rather than the nation, so every recruiter after the first will probably bounce 100% of their attempts.

New Rogernomics wrote:A good example would be where a regional officer nation or a founder acquires the key, and then CTEs.

In such cases, a Getting Help Request can get the old key deactivated and a new key issued. Same if the old recruiter nation moved to a new region. Unfortunately, it's not the same for living-but-inactive recruiter nations. We won't reissue the key if the nation is alive and still in the region.

New Rogernomics wrote: does that only API key become open to nation Y to acquire the key?

We'd issue a different key, cancelling the old one.

User avatar
New Rogernomics
Powerbroker
 
Posts: 9067
Founded: Aug 22, 2006
Left-wing Utopia

Postby New Rogernomics » Mon Sep 02, 2019 7:09 pm

Okay I get how it works now.

I had thought it would be a bit odd if a key could get lost forever.

Thanks for explaining it.

Holds silly opinions on some things, and likes animals of all kinds, including the scary ones.
Pro: Individualism, Humanism, Human Rights, Internationalism & Free Markets, Democracy, Decentralization, and Treaty of Sèvres.
Against: Social Conservatism, Religious Extremism, Extreme Nationalism, Racism, Homo/Trans phobia, Authoritarianism.

User avatar
Phydios
Minister
 
Posts: 2198
Founded: Dec 06, 2014
New York Times Democracy

Postby Phydios » Mon Sep 02, 2019 8:43 pm

Frisbeeteria wrote:
Phydios wrote:API keys are issued per region, so they aren't locked to a specific nation. Nation Y can use the key any time that no one else is using it.

There's a lot wrong with this statement. Keys are tied to a region, but a single nation is considered 'responsible' for it. If another nation misuses the key, the responsible nation could get a warning. Sharing a key requires a fair bit of trust.

Also, "any time that no one else is using it" is misleading. Multiple nations can use the same key simultaneously - it's just pointless. The rate limit applies to the key rather than the nation, so every recruiter after the first will probably bounce 100% of their attempts.

New Rogernomics wrote:A good example would be where a regional officer nation or a founder acquires the key, and then CTEs.

In such cases, a Getting Help Request can get the old key deactivated and a new key issued. Same if the old recruiter nation moved to a new region. Unfortunately, it's not the same for living-but-inactive recruiter nations. We won't reissue the key if the nation is alive and still in the region.

New Rogernomics wrote: does that only API key become open to nation Y to acquire the key?

We'd issue a different key, cancelling the old one.

Got it. Thanks for the clarification. I was going off my own experience with the Telegram API.
Romans 1:18-2:29, Ephesians 2:1-10
But God’s angry displeasure erupts as acts of human mistrust and wrongdoing and lying accumulate, as people try to put a shroud over truth. But the basic reality of God is plain enough. Open your eyes and there it is! | Those people are on a dark spiral downward. But if you think that leaves you on the high ground where you can point your finger at others, think again. Every time you criticize someone, you condemn yourself. | It’s a wonder God didn’t lose His temper and do away with the whole lot of us. Instead, immense in mercy and with an incredible love, He embraced us. He took our sin-dead lives and made us alive in Christ. He did all this on His own, with no help from us!

Previous

Return to Technical

Who is online

Users browsing this forum: No registered users

Advertisement

Remove ads