简体   繁体   中英

Where do I get “private_key_id” and “private_key”?

I'm not able to find "private_key_id" and "private_key" in the Google consele.

import 'package:googleapis_auth/auth_io.dart';
import 'package:googleapis/calendar/v3.dart' as v3;

class _MyHomePageState extends State<MyHomePage> {

  final accountCredentials = new ServiceAccountCredentials.fromJson(
    {
    "private_key_id": "562ab...",
    "private_key": "-----BEGIN PRIVATE KEY--............----END PRIVATE KEY-----\n",
    "client_email": "xxx@xxx.iam.gserviceaccount.com",
    "client_id": "1073.......",
    "type": "service_account",
    "project_id": "myapi"
   }
  );
}

Go to Menu > APIs & Services > Credentials

在此处输入图像描述

There you can see all the keys and credentials

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM