I am trying to verify integrity using GooglePlayIntegrityAPI.
- pass the Nonce generated by the Android app to IntegrityAPI and get the token from IntegrityAPI (this was successful)
- send the token from the Android app to the App server
- App server queries Play`s server to decrypt & verify the token.
- Play`s Server returns token payload.
My problem is 3-4.(sorry, i made a mistake) Image
GoogleServer returns the following error to MyAppServer.
"Code": 400,
"Message": "App is not found.",
"ErrorResponseContent": "
{
"error": {
"code": 400,
"message": "App is not found.",
"errors": [
{
"message": "App is not found.",
"domain": "global",
"reason": "badRequest"
}
],
"status": "INVALID_ARGUMENT"
}
}
"
What is the cause? By the way, the Android app returns 400 Bad request (this is an error generated by Appserver, so it doesn`t really matter).
** UPDATE(2022/10/21) **
here is my code where GoogleIntegrityAPI called from AppServer(Not from My AndroidApp).
var credentialJson = "...credential json...";
var credential = GoogleCredential.FromJson(credentialJson)
.CreateScoped(new[] { PlayIntegrityService.Scope.Playintegrity }).UnderlyingCredential;
var playIntegrityService = new PlayIntegrityService(new BaseClientService.Initializer()
{
HttpClientInitializer = credential,
ApplicationName = "...application name..."
});
var requestBody = new DecodeIntegrityTokenRequest
{
IntegrityToken = "...token..."
};
var request = playIntegrityService.V1.DecodeIntegrityToken(requestBody, "...package name...");
var response = await request.ExecuteAsync();
thank you.