If you are using Java in GAE then,
You can save the credentials in file under src/main/resources/ or if you are not using this structure, put the file in src package.
ClassLoader classloader = Thread.currentThread().getContextClassLoader();
InputStream is = classloader.getResourceAsStream("credentials.json");
or
InputStream is = AnyClassName.class.getResourceAsStream("credentials.json");
How to read is answered in this, How do I load a file from resource folder?
then you can convert the inputStream to Map or any pojo using any Json libraries, popular ones are,
Also make sure the file is not tracked in version control (if you use any), so that the file not available for others, and only during deployment you can inject that file.
Same kind of solution applies for other languages also, just not the same folder structure like java.