PRUVAN SUPPORT CENTER

Follow

Authentication

To use Pruvan Online, regularly or programmatically, you must have an authenticated session with the correct user-role for the service you want to access.

Getting a Valid Session

POST https://www.direct.pruvan.com/beta/login

You must include the Content-Type header of 'application/x-www-form-urlencoded'.

"Content-Type: application/x-www-form-urlencoded"

The body of your request should be 'payload={"username":"foo","password":"bar"}' and everything after the '=' needs to be URL-encoded.

payload=%7B%22username%22%3A%22foo%22%2C%22password%22%3A%22bar%22%7D

The response header set-cookie will include the cookies that you need to save and provide in the headers of your future requests.  In the event you receive more than one cookie of the same name, use the last one.

"set-cookie: PHPSESSID=3rdl4esa82udkeq9qup0qk2765; expires=Fri, 11-Aug-2015 21:01:09 GMT; path=/; domain=.direct.pruvan.com; secure; HttpOnly"
"set-cookie: PHPSESSID=d4vse1j8d6e41kvc6jj229dqt3v1; expires=Fri, 11-Aug-2015 21:01:09 GMT; path=/; domain=.direct.pruvan.com; secure; HttpOnly"
"set-cookie: AWSELB=854D717B12FL29DS960EEA1D4229932007EF7E2843A2C40CEFCEE50A367C52F9919256D300E384J7D14956E19CB7F0507FE33979F004C5A36717552D8D9BFDF5E8791A92PQ003CB035D60420D86605ANR832499CE2;PATH=/;DOMAIN=.direct.pruvan.com;EXPIRES=Fri, 11-Aug-2015 21:01:09 GMT;SECURE;HTTPONLY"

cURL Example

curl -c pruvan.cookie --d payload=%7B%22username%22%3A%22foo%22%2C%22password%22%3A%22bar%22%7D https://www.direct.pruvan.com/beta/login

-or-

curl -c pruvan.cookie --data-urlencode payload={\"username\":\"foo\",\"password\":\"bar\"} https://www.direct.pruvan.com/beta/login

Authenticating a Request

For your future requests you must supply your authenticated cookies in the cookie header of your request.

"cookie: PHPSESSID=d4vse1j8d6e41kvc6jj229dqt3v1; AWSELB=854D717B12FL29DS960EEA1D4229932007EF7E2843A2C40CEFCEE50A367C52F9919256D300E384J7D14956E19CB7F0507FE33979F004C5A36717552D8D9BFDF5E8791A92PQ003CB035D60420D86605ANR832499CE2"

cURL Example

curl -b pruvan.cookie https://www.direct.pruvan.com/beta/content/manual-integration/export.html?format=csv&extra=1&tz=300&lastUpdate=2015-08-10

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments