When you create credentials on Google Developer console You can create several different types of credentials depending upon which type is created you could have any of the following
They all have different formats. I have deleted the ones I am posting.
AIzaSyAcMvMr_bk91qRKZ5SGYEvF5HWjXVE7Xkk
1046123799103-d0vpdthl4ms0soutcrpe036ckqn7rfpn.apps.googleusercontent.com
G5QtTuBDp6ejKraR0XodNwaW
1046123799103-6v9cj8jbub068jgmss54m9gkuk4q2qu8@developer.gserviceaccount.com
Is there any way to validate these in my application. What kind of keys are they?
I am using C# but any info on what kind of keys the are would be of help.
I could probably come up with some kind of RegEx check for client id and service account email. But there must be a way of validating them better then that.
Update:
Google lets you validate the access token why is there no way to validate the credentials TokenInfo validation
Not working.
Convert.FromBase64String("AIzaSyAcMvMr_bk91qRKZ5SGYEvF5HWjXVE7Xkk");
Credentials and account types Credentials are the means of identifying an application or user to a service or API. Credentials can be obtained with three different types of accounts: service accounts, user accounts and external accounts.
The only way to verify if the credentials are valid is try and use them and see if the server accepts them.
There is no checksum or algorithm you can check, Google did not specify a format for those tokens so they are allowed to change it at any time. You can only treat them as opaque blobs and just pass them off and see what the server responds.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With