File Upload Client Authorize

0 votes
Hi,

I test File Upload Service - Upload File for User with PHP, but I get error message below

1401 - UNAUTHORIZED - Client is not authorized.

Before $uploadService->uploadFileForUser(), I use " User Management Service - Authenticate  ",  I get the same error message.

How do I authorize user ?

 

Thank you !
related to an answer for: File Upload Service in PHP
asked Apr 16, 2014 in App42 Cloud API-BaaS by guo (110 points)

1 Answer

0 votes
 
Best answer
 Hi Guo,

Unauthorized Exception mainly happends due to two main reasons.
1. Your API Key/Secret Key is wrong
2. Date and time settings of your device are not correct.

I assume that your API Key/Secret Key is correct. Do check the time settings of your device or emulator
Alternately, To ignore time settings on your device go to App HQ Console->App Manager -->view Apps and disable replay attack protection. 
Let us know if you still face any problem after the above solutions.
 
 
answered Apr 16, 2014 by naresh (350 points)
selected Apr 17, 2014 by guo
Hi,
Thanks for your reply !

I go to App HQ Console --> App Manager --> view Apps and disable replay attack protection.
I tried many times, sometimes it is success, and sometimes I get the same error message.
I detected that if filename or description include non-English(ex. Chinese, Japanese, Korean, etc), than this function will fail.
And now, I enable replay attack protection, the result is the same.

I use PHP.

Could add feature that can include non-English in filename and description in the future ?


I test File Upload Service, Image Processing Service, NoSQL Storage Service, I get many Notice below:

Notice: Undefined variable: params in /xxxx/xxxxx/xxxxx/xxxx/xxxxx.php on line xxx

How to solve this problem ?

Thank you !
Non English character in file name is not supported yet. We are working on it and update you soon.
Thank you very much !
Alternatively, You can encode your non english name into base64 string and save it in App42 Cloud. While retrieving it you need to just decode it back and it should work file.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...