Accessing the storage via PHP

Hey,

I was assigned the task to build an integration using PHP. I cannot use NodeJS for my task so I was wandering how can I use the Storage API outside the SDK implementations?
It seems like you API docs and PHP quick start guide have nothing about this and there are no other post on this forum either.

Thanks is advanced.

Hey @catalin – you cannot use the Storage API inside integrations. It is only accessible from the client side in board view and widget features.

If you need to build an integration that has storage capabilities, you’ll need to implement a database on your server.

1 Like

Okay, but what if I create a Board View, how can I access the storage inside PHP?

Hey @catalin,

The sdk is only available in js.

In PHP you would have to generate a Response which will includes that js code.

Hope it helps,
Laurent

1 Like

Hey @LaurentConroux - thanks for jumping in and shedding a bit more light on this :slight_smile:

@catalin I hope this helped. Please let us know if you need anything else!

-Alex

Any example of this? my only solution is to call the node sdk from php?

@catalin

I’m afraid I do not have an example to share at my disposal, but yes - you will indeed need to call the SDK in JS from PHP, I’m afraid.

I hope this helps clarify.

-Alex

@catalin sadly I do not have any example as well, as I am coding directly in js.

If you use a template system like blade or twig to send your web content response it might be easier.

If not, writing the js code as heredoc in the php before sending it might work, but I never did it you might want to google for examples.

Sorry,
Laurent

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.