티스토리 수익 글 보기
Class GetAuthTypeResponse
Stay organized with collections
Save and categorize content based on your preferences.
Page Summary
-
GetAuthTypeResponse is a builder used to create a
getAuthType()response for your script project in Data Studio. -
The builder includes methods such as
build(),printJson(),setAuthType(authType), andsetHelpUrl(helpUrl)to configure the authentication response. -
The
build()method validates the object and returns it in the format required by Data Studio. -
The
setAuthType()method sets the authentication type using an AuthType value, and thesetHelpUrl()method sets an optional URL for help with authentication setup.
Builder to create a getAuthType() 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 GetAuthTypeResponse object.
printJson()
Prints the JSON representation of this object. This is for debugging only.
Return
String
setAuthType(authType)
Sets the AuthType of the builder.
Parameters
| Name | Type | Description |
|---|---|---|
auth | Auth | The authentication type to set. |
Return
GetAuthTypeResponse — 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
GetAuthTypeResponse — This builder, for chaining.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-04-13 UTC.