How to upload a json file with secret keys to Heroku

后端 未结 3 2058
夕颜
夕颜 2021-01-08 01:01

I\'m building a rails app that pulls data from Google Analytics using the Google Api Client Library for Ruby.

I\'m using OAuth2 and can get everything working in dev

3条回答
  •  星月不相逢
    2021-01-08 01:27

    As discussed in this thread, rather than supplying a path to a json key file you can set three ENV variables instead:

    GOOGLE_ACCOUNT_TYPE=service_account
    GOOGLE_PRIVATE_KEY=XXX
    GOOGLE_CLIENT_EMAIL=XXX
    

    Source here.

提交回复
热议问题