[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Translation V2 API - Class Google::Cloud::Translate::V2::Credentials (v1.1.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.1.0 (latest)](/ruby/docs/reference/google-cloud-translate-v2/latest/Google-Cloud-Translate-V2-Credentials)\n- [1.0.1](/ruby/docs/reference/google-cloud-translate-v2/1.0.1/Google-Cloud-Translate-V2-Credentials)\n- [0.5.1](/ruby/docs/reference/google-cloud-translate-v2/0.5.1/Google-Cloud-Translate-V2-Credentials)\n- [0.4.1](/ruby/docs/reference/google-cloud-translate-v2/0.4.1/Google-Cloud-Translate-V2-Credentials)\n- [0.3.1](/ruby/docs/reference/google-cloud-translate-v2/0.3.1/Google-Cloud-Translate-V2-Credentials) \nReference documentation and code samples for the Cloud Translation V2 API class Google::Cloud::Translate::V2::Credentials.\n\nCredentials\n-----------\n\nRepresents the authentication and authorization used to connect to the Cloud Translation API. \n\nInherits\n--------\n\n- Google::Auth::Credentials\n\nExample\n-------\n\n```ruby\nrequire \"google/cloud/translate/v2\"\n\nkeyfile = \"/path/to/keyfile.json\"\ncreds = Google::Cloud::Translate::V2::Credentials.new keyfile\n\ntranslate = Google::Cloud::Translate.new(\n version: :v2,\n project_id: \"my-todo-project\",\n credentials: creds\n)\n\ntranslate.project_id #=\u003e \"my-todo-project\"\n```\n\nConstants\n---------\n\n### SCOPE\n\n**value:**\\[\"https://www.googleapis.com/auth/cloud-platform\"\\].freeze\n\n### PATH_ENV_VARS\n\n**value:**\\[\"TRANSLATE_CREDENTIALS\",\n\"TRANSLATE_KEYFILE\",\n\"GOOGLE_CLOUD_CREDENTIALS\",\n\"GOOGLE_CLOUD_KEYFILE\",\n\"GCLOUD_KEYFILE\"\\].freeze\n\n### JSON_ENV_VARS\n\n**value:**\\[\"TRANSLATE_CREDENTIALS_JSON\",\n\"TRANSLATE_KEYFILE_JSON\",\n\"GOOGLE_CLOUD_CREDENTIALS_JSON\",\n\"GOOGLE_CLOUD_KEYFILE_JSON\",\n\"GCLOUD_KEYFILE_JSON\"\\].freeze\n\n### DEFAULT_PATHS\n\n**value:**\\[\"\\~/.config/gcloud/application_default_credentials.json\"\\].freeze"]]