Skip to content

jomaresch/PlayIntegrityVerdictCheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Play Integrity Verdict Check

This is a small library which calls the Google API to decrypt and verify a Play Integrity Token.

Play Integrity API

https://developer.android.com/google/play/integrity/overview

Install

go get github.com/jomaresch/PlayIntegrityVerdictCheck

Usage

The library uses the default Google Http Client, so you have multiple ways for authentication. https://cloud.google.com/docs/authentication/production

// (optional) Set service account path.
pathToServiceAccount := "/app/service-account.json"
os.Setenv("GOOGLE_APPLICATION_CREDENTIALS", pathToServiceAccount)

// Create a new client.
appPackageName := "com.example.myapp"
client, err := NewPlayIntegrityVerdictClient(ctx, appPackageName)
if err != nil {
    panic(err)
}

// Decrypt your token. 
token := "ADD_YOUR_TOKEN"
verdict, err := client.DecryptVerdict(ctx2, token)
if err != nil {
    panic(err)
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages