Google API OAuth2 : “invalid_grant” error when requesting token for Service Account with Perl

后端 未结 4 917
后悔当初
后悔当初 2021-01-06 17:52

Got the credentials for Service Account from Developer Console

First, I converted p12 private key to PEM:

openssl pkcs12 -in 

        
4条回答
  •  难免孤独
    2021-01-06 18:23

    Try to use BASE64URL instead of BASE64. JWT/JWS/JWE specifications use BASE64URL.

    MIME::Base64 ---> MIME::Base64::URLSafe
    encode_base64 ---> urlsafe_b64encode
    

提交回复
热议问题