AI-generated Key Takeaways
-
GetAuthTypeResponse
enables defining the authentication method for your Data Studio connector script. -
It allows you to specify the authentication type, such as
USER_PASS
, and provide a help URL for users. -
GetAuthTypeResponse
offers methods likesetAuthType
,setHelpUrl
,build
, andprintJson
to configure and finalize the authentication response. -
The
build
method returns the validated object in the required format for Data Studio.
Builder to create a get
response for your script project.
function getAuthType() { const cc = DataStudioApp.createCommunityConnector(); return cc.newAuthTypeResponse() .setAuthType(cc.AuthType.USER_PASS) .setHelpUrl('https://www.example.org/connector-auth-help') .build(); }
Methods
Method | Return type | Brief description |
---|---|---|
build() | Object | Validates this object and returns it in the format needed by Data Studio. |
print | String | Prints the JSON representation of this object. |
set | Get | Sets the Auth of the builder. |
set | Get | Sets the help URL of the builder. |
Detailed documentation
build()
Validates this object and returns it in the format needed by Data Studio.
Return
Object
— The validated Get
object.
printJson()
Prints the JSON representation of this object. This is for debugging only.
Return
String
setAuthType(authType)
Sets the Auth
of the builder.
Parameters
Name | Type | Description |
---|---|---|
auth | Auth | The authentication type to set. |
Return
Get
— This builder, for chaining.
setHelpUrl(helpUrl)
Sets the help URL of the builder.
The help URL is an optional URL the user can visit to get help on setting up auth. This is
only supported for USER_PASS
, KEY
, and USER_TOKEN
authTypes.
Parameters
Name | Type | Description |
---|---|---|
help | String | The help URL to set. |
Return
Get
— This builder, for chaining.