Error Reporting API - Class Google::Cloud::ErrorReporting::Credentials (v0.42.3)

Reference documentation and code samples for the Error Reporting API class Google::Cloud::ErrorReporting::Credentials.

Credentials

Represents the authentication and authorization used to connect to the Error Reporting service.

Inherits

  • Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Credentials

Example

require "google/cloud/error_reporting"

keyfile = "/path/to/keyfile.json"
creds = Google::Cloud::ErrorReporting::Credentials.new keyfile

error_reporting = Google::Cloud::ErrorReporting.new(
  project_id: "my-project",
  credentials: creds
)

error_reporting.project_id #=> "my-project"