when I send request to 'https://api.amazonpinata.com/v1/players/register',get the errror:
{"error":{"code":100,"message":"The provided 'encryptedPayload' could not be decrypted. Ensure the payload is encrypted with the Game Public Key provided upon registration.","request_id":"93e2ba9b-0e46-11e9-b836-b5adbd9fa2d1"}}
I use the sample code that supported from GameOn To create the Client public/private key.
And encrypt the ClientPublicKey with GamePublicKey ,But the response code= 400,and the error.
the encrypt code:
public static string Encrypt(string publicKey, string payload) { var key = (RsaKeyParameters)PublicKeyFactory.CreateKey(Convert.FromBase64String(publicKey)); var param = DotNetUtilities.ToRSAParameters(key); using (var csp = new RSACryptoServiceProvider()) { csp.ImportParameters(param); var encrypted = csp.Encrypt(Encoding.UTF8.GetBytes(payload), false); return Convert.ToBase64String(encrypted); } }