• I am getting the following error each time Sermon Browser attempts to download a sermon’s associated associated bible verse:

    ERROR: The IP key is no longer supported. Please use your access key, the testing key ‘TEST’

    I am using the default ESV bible and, other than adding new sermons, there have been no changes to the page. This is apparently new, as it was working fine two weeks ago. The error appears on all sermons, not just the more recent ones.

    A search on the error yielded no results. Any help/suggestions/sympathy would be appreciated.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 31 through 36 (of 36 total)
  • zipadee

    (@zipadee)

    Hi, I’m struggling with this one too. I’m using a plugin called Bible text and the current function is:

    function mbbt_add_esv_text ($reference, $heading) {
        $esv_url = 'https://www.esvapi.org/v2/rest/passageQuery?key=IP&passage='.urlencode($reference).'&include-headings=false&include-footnotes=false';
        if ($heading === FALSE || strtolower($heading) == 'span')
            $esv_url .= '&include-passage-references=false&include_audio_link=false&include-first-verse-numbers=false';
        return wp_remote_retrieve_body(wp_remote_get($esv_url));
    }

    I’ve signed up for an API key and have tried replacing with the function someone supplied above but I’m getting nothing.

    I’d be really really grateful for help!

    • This reply was modified 7 years ago by zipadee.
    spalmstr

    (@spalmstr)

    When you signed up for the API key, was it for v2 of the API or v3. I signed up the other day, but it was for v3, and v2 didn’t recognise it.

    I just followed the link and got your Bible verses. Has something changed?

    • This reply was modified 7 years ago by spalmstr.
    zipadee

    (@zipadee)

    The new API key I’ve signed up for is for v3. I haven’t shared a link – maybe you were looking at somebody else’s?

    zipadee

    (@zipadee)

    I’m pretty sure v2 is deprecated and we need to use v3 now. It’s just getting this to work that I’m struggling with!

    zipadee

    (@zipadee)

    Got it working in the Bible Text plugin by replacing the existing function with the following in bible-text.php.

    function mbbt_add_esv_text($reference, $heading) {	
      $url = 'https://api.esv.org/v3/passage/html/?q='.urlencode($reference).'&include-headings=false&include-footnotes=false';
    
      $curl = curl_init();
    
      curl_setopt_array($curl, array(
        CURLOPT_URL => $url,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => "",
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 30,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => array(
          "authorization: Token ######",
          "cache-control: no-cache"
        ),
      ));
    
      $response = curl_exec($curl);
      $err = curl_error($curl);
    
      curl_close($curl);
    
      $json = json_decode($response, true);
      $passage = $json["passages"][0];
      
    	return ("<span class=\"esv-scripture\">" . $passage . "</span>");
    }
    
    spalmstr

    (@spalmstr)

    Wonderful – it fixed my problem in frontend.php by putting those changes in.

Viewing 6 replies - 31 through 36 (of 36 total)
  • The topic ‘Error loading bible verses’ is closed to new replies.