Skip to content
This repository was archived by the owner on Feb 13, 2026. It is now read-only.
This repository was archived by the owner on Feb 13, 2026. It is now read-only.

I use google-oauthlib-tool tool to get JSON data without credential field. I want to run demo on smartphones. Who helped me? Thank you! #90

@2014james

Description

@2014james

static UserCredentials fromResource(Context context, int resourceId)
throws IOException, JSONException {
InputStream is = context.getResources().openRawResource(resourceId);
byte[] bytes = new byte[is.available()];
is.read(bytes);
JSONObject json = new JSONObject(new String(bytes, "UTF-8"));
return new UserCredentials(
json.getString("client_id"),
json.getString("credential"),
json.getString("refresh_token")
);
}

{
"refresh_token": "。。。",
"token_uri": "https://accounts.google.com/o/oauth2/token",
"client_id": "。。。",
"client_secret": "。。。",
"scopes": [
"https://www.googleapis.com/auth/assistant-sdk-prototype"
]
}
no credential field?why

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions