For reference documentation for the API, see Stackdriver Logging API.
For instructions on setting up client libraries and authorizing the Stackdriver Logging API, with sample code, see Stackdriver Logging API Client Libraries.
Client libraries can use Application Default Credentials to easily authenticate with Google APIs and send requests to those APIs. With Application Default Credentials, you can test your application locally and deploy it without changing the underlying code. For more information, including code samples, see Google Cloud Platform Auth Guide.
You can restrict how much access your application has to Stackdriver Logging data by using Cloud IAM permissions and roles. For more information, see Stackdriver Logging Access Control Guide.