This might just be me that are stupid ;-)
I can get the code below to work fine with demo values for AppSecretToken and AgreementGrantToken - but what do I place there in a real senario?
I can see my AppSecretToken at secure.e-conomic.com/ as I have a developer account. But where do I get AgreementGrantToken??
The documentation states:
YOUR_AGREEMENT_GRANT_TOKEN This identifies the grant issued by an agreement, to allow your app to access their data
This really does not help in knowing what value I have to use.
I can guess from some reading that I might need a real e-connomic account before I can proceed as the documentation at https://www.e-conomic.com/developer/connect does not work with the developer account as https://secure.e-conomic.com/secure/api1/requestaccess.aspx?appId=<Public App Token> return: Only Danish, Swedish and Norwegian agreements are supported. when I try to use the developer account.
So I guess that I need to pay for a 'real' account before I can actually test anything?
Another question - what is allowed with the developer account. E.g. How much can I test like in the real world, can I for example issue invoices etc.
Think that you try hard with the documentation but the real experience is lagging a bit behind as the start curve is a bit high. Need standard examples (had to find one in the forum for PHP and restful). Need a simple guide to get up and running (see above). Might be that there is a guide somewhere, but I returned to this project after some month and are unable to find it again. E.g. the information is all over the place ;-)
$service_url = 'https://restapi.e-conomic.com/employees';
$curl = curl_init($service_url);
//$curl_post_data = array(
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_GET, true);
//curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post_data);
$curl_response = curl_exec($curl);
$json = json_decode($curl_response);