Can not connect to China Mainland Region after unlocking the appID

I am in China Mainland, and yesterday I sent you an email to request access to the Chinese Mainland region for my Photon app. I did receive the email said my appID has unlocked for China mainland server(s).

Today I try to connect to the 'cn' region and I found something strange:

1. #if CHINA did not work. If I write My code as
    public string NameServerHost = "";
    public string NameServerHost = "";
, it will always use "" because I can only connect to 'asia' or 'jp' region by ConnectUsingSettings().
So I just wrote:
public string NameServerHost = ""
BTW, #if CHINA also did not work for:
2. After I remove all the #if CHINA things, I just use "" and ConnectToRegion("cn"), in that case I got:
OperationResponse 230: ReturnCode: 32767 (Invalid application id). Parameters: {} Server: NameServer Address:
Photon.Realtime.LoadBalancingClient:DebugReturn(DebugLevel, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2085)
Photon.Realtime.LoadBalancingClient:OnOperationResponse(OperationResponse) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2159)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(StreamBuffer) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PeerBase.cs:620)
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/EnetPeer.cs:552)
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PhotonPeer.cs:1548)
Photon.Pun.PhotonHandler:Dispatch() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:205)
Photon.Pun.PhotonHandler:FixedUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:139)

Does that mean my appID was rejected by the mainland server? But I think I have unlocked it through email.


  • When I use "" and ConnectUsingSettings(), it connected to the 'rue' server, but I want to connect to the server in Shanghai whose region code is 'cn'.
  • JohnTubeJohnTube mod
    edited November 2019
    Hi @Instein98,

    Thank you for choosing Photon!

    Set a "Fixed Region" to "cn" in PhotonServerSettings under AppSettings.
    Here is a snippet for how to connect to china:
    void ConnectToChina()
                PhotonNetwork.PhotonServerSettings.AppSettings.FixedRegion = "cn";
                PhotonNetwork.PhotonServerSettings.AppSettings.UseNameServer = true;
                PhotonNetwork.PhotonServerSettings.AppSettings.AppIdRealtime = "ChinaPUNAppId"; // TODO: replace with your own AppId
                PhotonNetwork.PhotonServerSettings.AppSettings.Server = "";
    We will update the documentation accordingly.
Sign In or Register to comment.