All Bundles

OAuthClient

OAuth client

Operations

Code 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();
};

New

Constructor

New(filename:String, scopes:String[])
Parameters
NameTypeDescription
filenameStringOAuth configuration credentials in Google installed JSON format
scopesString[]list of OAuth scopes

GetToken

Get an OAuth token

method : public : GetToken() ~ OAuthToken
Return
TypeDescription
OAuthTokenOAuth token, Nil if error