API: "euOnly => 1" as return value

  • Profile Image
    Asked on May 20, 2016 at 06:52 AM


    I'm doing a quick test of the API. I have created and integrated a proper API key and form id, and am calling the following code:

    try {
      require_once ('jotform-api-php-master/JotForm.php');

      $api_key = 'XXX';
      $form_id = 'YYY';

      $jotformAPI = new JotForm($api_key, 'json', true);
      var_dump ($jotformAPI);
      $submissions = $jotformAPI->getFormSubmissions($form_id);

      echo '<pre>';
      echo '</pre>';
    catch (Exception $e) {

    And the result I get is:

    object(JotForm)[1] public 'baseURL' => string 'https://api.jotform.com' (length=23) private 'apiKey' => string '0285bbd763e32f18d8957060048715ec' (length=32) private 'debugMode' => boolean true private 'outputType' => string 'json' (length=4) private 'apiVersion' => string 'v1' (length=2)array emptyfetching url : https://api.jotform.com/v1/form/61223879766367/submissions http code is : 200 array 'euOnly' => int 1

    So, basically, it successfully connects and returns a JotForm object, but then the
    getFormSubmissions call only returns "euOnly = 1".

    Can you explain what is happening?
    Thank you
  • Profile Image
    Answered on May 20, 2016 at 09:11 AM

    Base on your profile location, you are from Europe. EU users form data are saved on EU servers. This is due to EU privacy law as explained on this page https://www.jotform.com/blog/178-EU-Safe-Forms-Our-Solution-to-the-EU-Safe-Harbor-Invalidation.

    For EU users, you have to use https://eu-api.jotform.com as your API endpoint in order to retrieve your form data.

    To do that, open the JotForm.php file and find https://api.jotform.com (it is found on top, line 12) and replace it with https://eu-api.jotform.com

    That should fix the problem.

    If you need further clarification, let us know. We'd be happy to assist you.