Skip to content

Commit e16bc4b

Browse files
committed
set correct endpoint for eu users
1 parent 57981af commit e16bc4b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

JotForm.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ public function __construct($apiKey = '', $outputType = 'json', $debugMode = fal
2020
$this->apiKey = $apiKey;
2121
$this->debugMode = $debugMode;
2222
$this->outputType = strtolower($outputType);
23-
23+
$user = $this->getUser();
24+
# set base url for EU users
25+
if (isset($user['euOnly'])) {
26+
$this->baseURL = 'https://eu-api.jotform.com';
27+
}
2428
}
2529

2630
public function __get($property) {

0 commit comments

Comments
 (0)