jolicode / slack-php-api

:hash: PHP Slack Client based on the official OpenAPI specification
https://jolicode.github.io/slack-php-api/
MIT License
224 stars 56 forks source link

Request-URI Too Large #111

Closed gmcmicken closed 2 years ago

gmcmicken commented 3 years ago

Some API methods such as views.publish require a large payload and as a result - can fail with Request-URI Too Large. Is there a way to have the client send as HTTP POST with either form values or JSON encoded body? Slack API supports both of these options. Using the Slack Web API

damienalexandre commented 3 years ago

Slack document this method as "GET":

https://github.com/jolicode/slack-php-api/blob/65ae9fd575899f0fe6eae4d16595e49940c1261a/resources/slack-openapi.json#L22870-L22961

Because https://github.com/slackapi/slack-api-specs has so much issues, we have a patch system in place to edit the specification when needed. But this change would be a big one, may I suggest you open an issue on https://github.com/slackapi/slack-api-specs too?

Also here is the documentation about our patch system https://github.com/jolicode/slack-php-api/blob/master/doc/updating-sdk.md is you wanna submit a PR about this :wink:

Thanks a lot

ryneandal commented 2 years ago

@gmcmicken Did you happen to open an issue on https://github.com/slackapi/slack-api-specs? This is a major issue for one of our implementations and I'll go ahead and take the reins to resolve this issue if need be.

gmcmicken commented 2 years ago

No sorry I didn't have the time to pursue this one. Thanks @ryneandal

ryneandal commented 2 years ago

One interesting note is that I cannot replicate this in our "dev" environment, which is just a free-tier Slack organization that has little to no API call volume. I'm using the same payload and functionality, yet it posts with no issue.

I'm wondering if this is somehow related to the number of requests our production environment makes.