No description, website, or topics provided.
JavaScript Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

agiro server

Proposed backend for the Android OCR scanner project, agiro.


Dev server

Start the dev server.

./ /path/to/agiro-server/app/

Get token for the user to use in later requests to the server.

curl http://localhost:8080/_ah/login \
    -d "" \
    -c -

Make request to the server with the auth token.

Replace with the contents of dev_appserver_login example That request will then be signed with account token.

curl http://localhost:8080/invoices \
    -d "reference=123456" \
    -d "document_type=bla" \
    -b "dev_appserver_login="<PLACE COOKIE HERE>"; Path=/;"


Obtain auth token for the user.

curl \
    -d Email=<YOUR EMAIL> -d Passwd=<YOUR PASSWORD> \
    -d accountType=HOSTED_OR_GOOGLE \
    -d source=agiroapp \
    -d service=ah

This will return something like.


Take the content of Auth and use in the next request.

curl -c - \

This will return the ACSID cookie that we will use when making request to the api.	FALSE	/	FALSE	1294864134	ACSID	AJKiY...

Now we can add new invoices for the authenticated user.

curl \
    -d "reference=123456" \
    -d "document_type=bla" \
    -H "Cookie: ACSID=AJKiY..."

And list the recent added invoices.

curl \
    -H "Cookie: ACSID=AJKiY..."