I have a bot that has been graduated and is able to make calls to the endpoint to get posts:
https://platform.ringcentral.com/team-messaging/v1/chats/XXX/posts/PPP
I am also able to receive information about the same posts via webhook. In both cases, the bot is using the persistent token retrieved by the bot using the code we receive when added to the environment.
However, I am not able to retrieve the contents of the post attachments using that same token. The content URI comes in this format:
https://dl.mvp.ringcentral.com/file/NNN
I have tried using a browser, Postman, and code (C#). I have tried providing the token in the Authorization header ("Bearer TTT") as well as on the query string as shown in another example, but all responses are always 404 with this JSON:
[ {
"errorCode": "CMN-102",
"message": "Resource for parameter [fileId] is not found.",
"parameterName": "fileId" } ]}
Can the bot persistent token be used to retrieve attachment data? If not, how can I obtain the token that will work to download attachment data without user interaction?
Thanks!