Difficulty onboarding with Cloud API

i’ve had difficulty learning to use the API using the documentation i’ve found. The swagger docs are helpful to an extent, but there don’t seem to be accompanying docs at http://groupdocs.com/docs/dashboard.action for some endpoints (Storage, for example).

Some usage of terms seems inconsistent. For example, the user dashboard uses the term “client ID” whereas the API docs and swagger use the term “user ID”. i didn’t at first realize that they refer to the same value. As another example, “fileId” appears to sometimes refer to the ID (in renaming files), and other times to a UID (in document conversion).

It took me a long time to find documentation regarding the signing of requests made, and i haven’t found instructions that don’t use the SDK (Authenticating API Requests | GroupDocs.Total Cloud | Documentation).

Where can i find such docs? Searches are made difficult by the signatures product family results that are returned.

Hello ,

Thank you for your inquiry.

Yes, you are right some GroupDocs usage therms are different (It was made for user readable). But if you will use our API, then you should stick the terms from Swagger documentation .

Unfortunately, we don’t have the documentation, for how to sign Url, that don’t uses our SDK. But if you don’t want to use our SDK then you can investigate, how this method implemented, from SDK sources. Also I can help you with this if you will specify, which programming language you are using.


Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Thank you. We are using Python. If you don’t have an example of working Python code, would you be able to provide specs for the HMAC and base64 encoding?

This is my best guess so far, based on inferences from the JavaScript code found at http://groupdocs.com/docs/display/articles/Integration+for+Zapier+-+How+to+Create+a+Custom+Trigger:

import base64
import hashlib
import hmac

def sign(key, msg):
    signature = hmac.new(
        key,
        msg.encode('utf-8'),  # not sure if encoding is needed
        hashlib.sha1
    ).digest()  # unicode digest. could alternately use hex digest
    return base64.b64encode(signature)  # altchars param?

i was passing in the entire url (protocol+domain+path+query params) as a string into msg and using the private key as key. The result doesn’t match the signature which the swagger docs indicate for the provided key and url.

Hello,

Thank you for coming back.

Basically, we have some demo examples for our GroupDocs.Sdk for Python language .These samples were created with documentation for the Api methods, so you can recheck them here . Also you can recheck our sources for the Sdk here , there you will find how was implemented signUrl method .

If you will have more questions please feel free to contact us.


Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Thank you, using those resources, i was able to get URL signing to function properly.

Glad to hear this.

If you will have more questions please feel free to contact us.


Best regards,

Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+