Supplied key param cannot be coerced into a private key with Google APIs

后端 未结 2 1821
鱼传尺愫
鱼传尺愫 2020-12-02 00:10

I\'m trying to test this example that I found here so that I can do a direct upload on the client side without having the user login using Google Cloud Storage.

All

2条回答
  •  半阙折子戏
    2020-12-02 00:44

    First, you need to use openssl_pkcs12_read to read the key file, not file_get_contents. Second, I believe you want to leave off the second parameter to openssl_get_privatekey.

    I highly recommend you use google-api-php-client for this, which has Google_P12Signer.php

提交回复
热议问题