Bread Cloud - 2 Step Integration

Info! This documentation only applies to Bread Cloud. For Bread On Premise Server product, refer to installation guide & developer guide that came with the product.

Step 1 - Authorization - Get the Session Id

Authorization enables you to pass your API key, document location, other optional parameters and get a SessionID in return which is then passed to editor. Authorization not only allows you to send data securily to Bread Cloud, but also keep it hidden from end users.

Request:

http://cloud.breadsoftware.com/getSession?api=<API KEY>&document=http://www.yourserver.com/doc/abc.docx
<API KEY> is the Bread API key

The response is a JSON string with sessionID
{"code":0,"message":"ok","data":{"sessionID":"xxxxxx"}}
In event of an error, the response can be
{"code":4,"message":"no or wrong API Key","data":null}


Step 2 - Load Editor - Pass the Session Id

Now the sessionID received in Step 1, should be passed in Step 2.
You can simply pass the sessionID to http://cloud.breadsoftware.com to generate an editor link that can be linked or embeded in an iframe as shown. Check Options to see how to set height/width of editor.

Link Code for editor

http://cloud.breadsoftware.com/?<SESSION ID>


Embed Code for editor

<style> body { margin: 0; padding: 0; } </style> <iframe height=100% width=100% marginwidth=0 marginheight=0 frameborder=0 scrolling=no src="http://cloud.breadsoftware.com/?<SESSION ID>"> Your browser does not support iframes.</iframe>

<SESSION ID> is the sessionID received in Step 1.