Skip to content

FAQ ​

1. General Key Questions ​

Q: Who generates each type of key, and at which stage is it generated?

A:

  • userSignature: Generated by the APP server. Before the APP client calls the SUD SDK authentication interface, it first requests it from the APP server, then uses it as an input parameter to complete SDK authentication.
  • sessionKey: Generated by SUD OP SVR. It is issued to and held by the Game SVR when the player logs into the game; when retrieving sensitive user information, the APP SVR temporarily obtains this key to encrypt the sensitive data, and after the Game SVR receives the encrypted data, it decrypts it using the sessionKey it holds.
  • API security keys (symmetric key / app key pair / SUD OpenPaaS certificate): Generated online and downloaded by the APP in the SUD OpenPaaS management console, used for S2S interface communication between the APP server and SUD OP SVR.

Q: How should I handle an expired key?

A:

  • userSignature expired (rejected by the server because the expires_at in the payload has expired): Re-initiate a signature generation request to the APP server.
  • sessionKey expired: Re-run the game login flow to obtain a new session key.
  • API security key expired: Log into the SUD OpenPaaS management console to check the key status; if rotation is needed, regenerate the key pair/certificate and update the server configuration accordingly.

Q: What are the risks if a key is leaked, and how should I respond?

A:

  • Risks: Identity forgery, leakage of sensitive user information, illegal interface calls, etc.
  • Emergency response:
    1. Immediately revoke and rotate the corresponding key in the SUD OpenPaaS management console;
    2. Update the server configuration accordingly to ensure the old key is no longer used;
    3. Audit interface call logs to locate the leak time window and abnormal requests.

2. User Signature (userSignature) ​

Q: When calling the SDK authentication interface, it reports that the user signature verification failed / is invalid. How do I troubleshoot?

A:

  1. Confirm that the userSignature is generated by the APP server according to the documentation specifications.
  2. Check whether the APP login Token is valid and not expired.
  3. Verify that the signature algorithm, parameters, and encoding format are consistent with the documentation.
  4. Confirm that the signature was not tampered with or corrupted during transmission (such as lost URL encoding or Base64 truncation).

Q: What functionality is affected if I cannot obtain the userSignature?

A: It directly causes SDK authentication to fail, making it impossible to proceed with subsequent business flows such as game login and retrieving user information.


3. Session Key (sessionKey) ​

Q: Why can't I retrieve user information after logging into the game?

A: This is usually caused by an exception in the sessionKey flow. Common causes are:

  1. Failure to obtain encrypted_session_key.
  2. The APP server did not correctly implement the sessionKey decryption logic.
  3. The decryption algorithm, key, or encoding method does not match the documentation.

Q: How should I handle a sessionKey decryption failure?

A:

  1. Decrypt following the documentation: Session Key Decryption Guide.
  2. Check whether the ciphertext is complete and free of garbled characters or escaping anomalies.
  3. Confirm that the decryption key and encoding method (such as Base64) are configured correctly.

Q: How is the sessionKey passed between systems?

A:

  • Login stage: SUD OP SVR generates the sessionKey for the current session and issues it to the Game SVR to hold. It is kept only on the server side and is not delivered to the client.
  • When retrieving sensitive information: SUD OP SVR encrypts the sessionKey into encrypted_session_key, which is relayed via SUD OP → APP to the APP SVR; the APP SVR decrypts it with the data symmetric encryption key to obtain the sessionKey, AES-encrypts the sensitive user information, and returns it.
  • Decryption stage: The encrypted result is returned along the original path to the Game, where the Game SVR decrypts the sensitive data using the sessionKey it already held from the login stage.

4. API Security Keys ​

Q: When the server calls the SUD OpenPaaS API, it reports a signature error / authentication failure. How do I troubleshoot?

A:

  1. Verify that the SN of the app key pair and symmetric key matches the SUD OpenPaaS management console (the key pair must be matched, and the symmetric key must not have been rotated).
  2. Check that the string-to-sign concatenation strictly follows the urlpath\nappid\ntimestamp\ndata format, with the separator being LF (\n).
  3. Confirm that the request header X-Sud-Timestamp matches the _timestamp inside the encrypted message, and that the difference from the server's current time does not exceed 300 seconds (5 minutes).
  4. Check whether _n (Nonce) is regenerated for each request and not reused.
  5. See Chapter 5 of Server API Signature and Encryption for the full error codes and mapping.

Q: Where is the complete specification for server API signature and encryption?

A: Server API Signature and Encryption

Q: Does API communication require regenerating the signature every time?

A: Yes. Every request must regenerate the signature and _n (Nonce) to prevent replay attacks.