OAuth client
OperationsCode example:
scopes := ["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/generative-language.retriever"];
client := System.IO.Net.OAuth.OAuthClient->New("client_secret.json", scopes);
each(i : 3) {
client->GetToken()->GetAccessToken()->PrintLine();
};
Constructor
New(filename:String, scopes:String[])
Name | Type | Description |
---|---|---|
filename | String | OAuth configuration credentials in Google installed JSON format |
scopes | String[] | list of OAuth scopes |
Get an OAuth token
method : public : GetToken() ~ OAuthToken
Type | Description |
---|---|
OAuthToken | OAuth token, Nil if error |