• Resolved eirikr70

    (@eirikr70)


    Hello, I can’t have any success in running TranslatePress with my recently created Google API key. I have re-generated the key unsuccessfully. It seems that the request would carry an incorrect argument ?…

    Réponse :
                    
    Array
    (
        [code] => 400
        [message] => Bad Request
    )
                
    Corps de réponse :
                    
    {
      "error": {
        "code": 400,
        "message": "API key expired. Please renew the API key.",
        "errors": [
          {
            "message": "API key expired. Please renew the API key.",
            "domain": "global",
            "reason": "badRequest"
          }
        ],
        "status": "INVALID_ARGUMENT",
        "details": [
          {
            "@type": "type.googleapis.com/google.rpc.ErrorInfo",
            "reason": "API_KEY_INVALID",
            "domain": "googleapis.com",
            "metadata": {
              "service": "translate.googleapis.com"
            }
          }
        ]
      }
    }
                
    Réponse complète de wp_remote_get() :
                    
    Array
    (
        [headers] => WpOrg\Requests\Utility\CaseInsensitiveDictionary Object
            (
                [data:protected] => Array
                    (
                        [vary] => Array
                            (
                                [0] => Origin
                                [1] => X-Origin
                                [2] => Referer
                            )
    
                        [content-type] => application/json; charset=UTF-8
                        [content-encoding] => gzip
                        [date] => Sat, 20 Apr 2024 17:59:56 GMT
                        [server] => ESF
                        [cache-control] => private
                        [x-xss-protection] => 0
                        [x-frame-options] => SAMEORIGIN
                        [x-content-type-options] => nosniff
                        [alt-svc] => h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
                    )
    
            )
    
        [body] => {
      "error": {
        "code": 400,
        "message": "API key expired. Please renew the API key.",
        "errors": [
          {
            "message": "API key expired. Please renew the API key.",
            "domain": "global",
            "reason": "badRequest"
          }
        ],
        "status": "INVALID_ARGUMENT",
        "details": [
          {
            "@type": "type.googleapis.com/google.rpc.ErrorInfo",
            "reason": "API_KEY_INVALID",
            "domain": "googleapis.com",
            "metadata": {
              "service": "translate.googleapis.com"
            }
          }
        ]
      }
    }
    
        [response] => Array
            (
                [code] => 400
                [message] => Bad Request
            )
    
        [cookies] => Array
            (
            )
    
        [filename] => 
        [http_response] => WP_HTTP_Requests_Response Object
            (
                [response:protected] => WpOrg\Requests\Response Object
                    (
                        [body] => {
      "error": {
        "code": 400,
        "message": "API key expired. Please renew the API key.",
        "errors": [
          {
            "message": "API key expired. Please renew the API key.",
            "domain": "global",
            "reason": "badRequest"
          }
        ],
        "status": "INVALID_ARGUMENT",
        "details": [
          {
            "@type": "type.googleapis.com/google.rpc.ErrorInfo",
            "reason": "API_KEY_INVALID",
            "domain": "googleapis.com",
            "metadata": {
              "service": "translate.googleapis.com"
            }
          }
        ]
      }
    }
    
                        [raw] => HTTP/1.1 400 Bad Request
    Vary: Origin
    Vary: X-Origin
    Vary: Referer
    Content-Type: application/json; charset=UTF-8
    Content-Encoding: gzip
    Date: Sat, 20 Apr 2024 17:59:56 GMT
    Server: ESF
    Cache-Control: private
    X-XSS-Protection: 0
    X-Frame-Options: SAMEORIGIN
    X-Content-Type-Options: nosniff
    Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
    Connection: close
    Transfer-Encoding: chunked
    
    {
      "error": {
        "code": 400,
        "message": "API key expired. Please renew the API key.",
        "errors": [
          {
            "message": "API key expired. Please renew the API key.",
            "domain": "global",
            "reason": "badRequest"
          }
        ],
        "status": "INVALID_ARGUMENT",
        "details": [
          {
            "@type": "type.googleapis.com/google.rpc.ErrorInfo",
            "reason": "API_KEY_INVALID",
            "domain": "googleapis.com",
            "metadata": {
              "service": "translate.googleapis.com"
            }
          }
        ]
      }
    }
    
                        [headers] => WpOrg\Requests\Response\Headers Object
                            (
                                [data:protected] => Array
                                    (
                                        [vary] => Array
                                            (
                                                [0] => Origin
                                                [1] => X-Origin
                                                [2] => Referer
                                            )
    
                                        [content-type] => Array
                                            (
                                                [0] => application/json; charset=UTF-8
                                            )
    
                                        [content-encoding] => Array
                                            (
                                                [0] => gzip
                                            )
    
                                        [date] => Array
                                            (
                                                [0] => Sat, 20 Apr 2024 17:59:56 GMT
                                            )
    
                                        [server] => Array
                                            (
                                                [0] => ESF
                                            )
    
                                        [cache-control] => Array
                                            (
                                                [0] => private
                                            )
    
                                        [x-xss-protection] => Array
                                            (
                                                [0] => 0
                                            )
    
                                        [x-frame-options] => Array
                                            (
                                                [0] => SAMEORIGIN
                                            )
    
                                        [x-content-type-options] => Array
                                            (
                                                [0] => nosniff
                                            )
    
                                        [alt-svc] => Array
                                            (
                                                [0] => h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
                                            )
    
                                    )
    
                            )
    
                        [status_code] => 400
                        [protocol_version] => 1.1
                        [success] => 
                        [redirects] => 0
                        [url] => https://translation.googleapis.com/language/translate/v2
                        [history] => Array
                            (
                            )
    
                        [cookies] => WpOrg\Requests\Cookie\Jar Object
                            (
                                [cookies:protected] => Array
                                    (
                                    )
    
                            )
    
                    )
    
                [filename:protected] => 
                [data] => 
                [headers] => 
                [status] => 
            )
    
    )
Viewing 1 replies (of 1 total)
  • Hello there,

    Thanks for reaching out to us!

    Unfortunately there is nothing we can do about this. Please try contacting your automatic translation API provider in order to get this sorted out.

Viewing 1 replies (of 1 total)
  • The topic ‘TranslatePress – Google API Key error – API key expired’ is closed to new replies.