android – GoogleAuthUtil.getToken returns GoogleAuthException: ServiceDisabled-ThrowExceptions

Exception or error:

I have followed the procedure mentioned in the google documentation regarding creating enabling Google Drive API and creating credentials for Google drive in the Developer Console for Google Drive. i am calling authentication as given below, accountName is the gmail ID. When I call the below function i get ServiceDisabled exception.

GoogleAuthUtil.getToken(context, gam.getAccountByName(accountName), "oauth2:" + DriveScopes.DRIVE)

I have 2 different app’s, one personal and other developed for a 3rd party. Since both are developed by me i have used the same JKS file for signing the apps. Since the JKS file is same SHA1 is same for both. Is that creating problem here ?

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *