Jump to content

Consuming API throughout PHP


Recommended Posts

Posted

Hi Everyone. Thanks for your time. I hope you all are having a good day.

At the moment I'm Developing a Chatbot with PHP backend. I would like to know if there's a possibility to consume the Loyverse API with some library or command. I've searching for days and I find curl to do oit but, It doesn't offer Bearer token/Authorization system.

Somebody is dealing with PHP here or Do you know if there's a library?

All recommendations will be appreciated.

Have a good day, Mizar. 

  • Like 1
Posted

Hi Everyone. I find the Solution finally.

To retrieve Data with PHP we should Use guzzle for php.

That library is going to help us getting data.

Check the documentation for Guzzle at https://docs.guzzlephp.org/en/stable/ and look at the section about Authorization, In that place we will find the way to put the Bearer token.

After that, when retrieving the data just store it as an array or echo it with for loop.

I hope this helps the community!

I hope you all have been a nice New Year!

Mizar.

  • Like 1
  • Like 1
  • 3 weeks later...
Posted

someone made some work with it already

look at

https://packagist.org/packages/pashkevich/loyverse-sdk

https://github.com/siarheipashkevich/loyverse-sdk

 

 

Posted

Thanks German. I readed before, but there's not Documentation. I contact the creator on LinkedIn with no responses. If you can understand or get some documentation, let's go. the other way is dealing with guzzle!

Mizar.

Loyverse Point of Sale

 

 

 

 

×
×
  • Create New...