Verify Service Account in Google Cloud Platform (GCP)


Service accounts are used by applications to make authenticated API calls in the Google Cloud Platform (GCP).

To verify service account in GCP

The console window of the IoT Cloud Tester app shows the call to the Google Cloud Platform to verify  the service account.


[2021-04-10 16.13.09.965] Reading service account file.

[2021-04-10 16.13.10.219] Send request to GCP to get project info.

GET:https://cloudresourcemanager.googleapis.com/v1/projects

ServiceAccountCredentials{clientId=114793656657689264193, clientEmail=iot-cloud-tester@iot-cloud-tutorial.iam.gserviceaccount.com, privateKeyId=15def66500d38a425db8fa9dfcc81251c07de8ad, transportFactoryClassName=com.google.auth.oauth2.OAuth2Utils$DefaultHttpTransportFactory, tokenServerUri=https://oauth2.googleapis.com/token, scopes=[https://www.googleapis.com/auth/cloud-platform], serviceAccountUser=null, quotaProjectId=null}

[2021-04-10 16.13.11.045] GCP response for project info request.

{
"projects" : [ {
"createTime" : "2021-04-03T15:32:22.260Z",
"lifecycleState" : "ACTIVE",
"name" : "IoT Cloud Tutorial",
"projectId" : "iot-cloud-tutorial",
"projectNumber" : "268441375077"
} ]
}