Hey everyone! I’m facing an issue trying to authenticate using json key file where my GoogleCredentials work perfectly fine on my local machine but don’t on the server. I’m using the following code:
InputStream credentialsStream = createJsonFile(keyFileStream); //reading json key file
GoogleCredentials credentials = GoogleCredentials.fromStream(credentialsStream)
.createScoped(
Collections.singletonList("https://www.googleapis.com/auth/devstorage.full_control")
); //on this step program stuck without any error
Problem:
Anyone else faced this issue or have any solutions?
This issue has become critical for me, so I am reaching out to you for help or suggestions.
Hi @devmanish,
Welcome to Google Cloud Community!
If your codes doesn’t work you may refer to these documents for guidance when working with your JSON file:
If the issue persists, don't hesitate to reach out to Google Cloud Support by filing a ticket for further assistance.
I hope the information above is helpful.