I am testing file upload for our app, and consistently getting ERR_403_DEVELOPER_INACTIVE.
--> I have an api key, and I retrieve tokens from the .../autheticator.php without problem...
...do I need to do something else to activate my account/app?
here are some details, tell me if you need more information.
I am using the new api, at: 'https://transfer.lulu.com/api/create/v1/file';
I am using curl, and sending the auth_user and auth_token in an array passed to CURLOPT_POSTFIELDS (as I do for getting a token)
Message edited by Nick358 1 year ago
2 years ago
I have checked your token, and it is active. I don't see anything that would cause this problem. My best guess is that auth_token and auth_user shouldn't be in POSTFIELDS. Those should be sent as part of the query string.
2 years ago
Thanks for your answer Ryan,
How do you send the query string other than with an array passed to CURLOPT_POSTFIELDS?
(There is CURLOPT_USERPWD ...doesn't seem to work here.)
Here is the documentation for CURLOPT_POSTFIELDS from php:
CURLOPT_POSTFIELDS The full data to post in a HTTP "POST" operation. To post a file, prepend a filename with @ and use the full path. The filetype can be explicitly specified by following the filename with the type in the format ';type=mimetype'. This parameter can either be passed as a urlencoded string like 'para1=val1¶2=val2&...' or as an array with the field name as key and field data as value. If value is an array, the Content-Type header will be set to multipart/form-data. As of PHP 5.2.0, value must be an array if files are passed to this option with the @ prefix.
I have to point out that, up until yesterday, I had two api keys, --> associated with a same application name! (I must have filled the form twice upon registering).
I figured this could cause a problem, so I deleted one yesterday just a few minutes after creating this topic here.
Nonetheless, I get the same ERR_403_DEVELOPER_INACTIVE.
So I still need your help on this!
It is surprising to me that I can retrieve tokens without problem by sending to the Lulu API my 'username', 'password', and 'responseType' using an array passed to CURLOPT_POSTFIELDS --> yet couldn't send my 'api_key' and 'auth_token' the same way. (but please do tell me if you know another way to pass the query string for a file upload with php curl).
Should I create a new app and request a new api_key just in case?
Thanks again for your help and time, it's much appreciated,
Having more keys won't matter, and creating a new key will not solve this problem. The issue is that our API management system is not able to retrieve your key from the request. The login API doesn't use the same management system and looks at both QUERY_ARGS and POST parameters. This is an artifact of the language used to process the request. Some languages use a single mechanism to access either type of argument while others separate QUERY_ARGS from POST parameters as the HTTP spec does.
I am not a PHP programmer, so I can only help so much, but take a look at this post on stackoverflow: http://stackoverflow.com/questions/1225409/how-to-switch-from-post-to-get-in-php-curl
Specifically, you need to modify the URL that you are requesting:
$qry_str = "?x=10&y=20";
$ch = curl_init();
// Set query data here with the URL
curl_setopt($ch, CURLOPT_URL, 'http://example.com/test.php' . $qry_str);
It works now.
Thank you for the explanation!
Please sign in to add a post.