|
Thanks for the contribution! Before we can merge this, we need @ArielTM to sign the Salesforce Inc. Contributor License Agreement. |
Sorry, something went wrong.
Codecov Report❌ Patch coverage is 11.11111% with 24 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## main #1667 +/- ##
==========================================
- Coverage 85.36% 85.20% -0.16%
==========================================
Files 113 113
Lines 12802 12829 +27
==========================================
+ Hits 10928 10931 +3
- Misses 1874 1898 +24
☔ View full report in Codecov by Harness. |
Sorry, something went wrong.
|
Hi @ArielTM thanks for you contribution 🚀 they are alway welcome Unfortunately we need to hold off on introducing these changes due to these APIs being in a limited access stage This API is currently in a limited access stage. You may be able to obtain a token and call the API, but to get a valid response, you must be enrolled in the program. Contact Customer Experience at feedback@slack.com to request to be added. We would also need unit tests for these changes 🙏 |
Sorry, something went wrong.
|
@WilliamBergamin Until this is in "limited access" , would you say the best way to use this api would be to do something like this instead ? app.client.api_call(
api_method="assistant.search.context",
http_verb="POST",
headers={"Authorization": f"Bearer {os.environ.get('SLACK_BOT_TOKEN')}",},
json={
"action_token": action_token,
"query": text,
"limit": 5,
},
)
|
Sorry, something went wrong.
|
@Pythonista7 Yess this is the recommended approach 💯 |
Sorry, something went wrong.
Summary
Add support for assistant.search.context . Although listed in docs, it is yet to be supported.
There's a discrepancy between https://api.slack.com/methods/assistant.search.context and https://api.slack.com/docs/apps/data-access-api#use-action-token on whether action_token is required. From my testing it is so I set it as such. Lmk if that's not the case.
Testing
Ran it using my app and workspace
Category
Requirements