Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

How to use the API in Laravel

More
6 years 3 days ago #188376 by josulite
Hi there,

I am using Postman to make Post calls to LimeSurvey API to get the session key, as you can see here.



It works great!


But now I want to do the same in a Laravel Application. I am using Guzzle as Http Client.

This is my function:



And when I call this Laravel function from postman, that's what I get:


Can anyone help me how could I make a Post request to LimeSurvey Api using Guzzle in Laravel, and sending raw json as a parameter?
The topic has been locked.
More
6 years 2 days ago #188414 by DenisChenu
You don't need a http client, you need a jsonrpc client …

duckduckgo.com/?q=Laravel+jsonrpc+client

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
6 years 2 days ago #188424 by josulite
This is what I am using:
docs.guzzlephp.org/en/stable/

Is it fine?
The topic has been locked.
More
6 years 2 days ago - 6 years 2 days ago #188432 by kossaw
No, you need a jsonRPC Client

"weberhofer/jsonrpcphp": "^2.2"


or use a prepackaged solution

github.com/evently-nl/limeremote
Last edit: 6 years 2 days ago by kossaw.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose