Download Public Import File
- Print
- DarkLight
- PDF
Download Public Import File
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Post
/api/v1/downloadPublicImportFile
Permission required: run-import
Changelog
Version | Description |
---|---|
3.0.0 | Added |
Header parameters
X-User-Id
stringRequired
The user ID.
ExampleCkCPNctrgCDfmWLqC
X-Auth-Token
stringRequired
The authentication token.
Example1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE
Body parameters
Example 1
{
"fileUrl": "https://www.freepik.com/photos/dog",
"importerKey": "pending-avatars"
}
object
fileUrl
string Required
The url of the file. It must start with http
or https
.
importerKey
string Required
It indicates how Rocket.Chat should handle the uploaded file. The accepted importer keys are:
csv
hipchatenterprise
pending-avatars
pending-files
slack
slack-users
Responses
200
OK
Success
{
"success": true
}
object
success
boolean
400
Bad Request
Example 1
{
"success": false,
"error": "The importer (png) has no import class defined. [error-importer-not-defined]",
"errorType": "error-importer-not-defined",
"details": "uploadImportFile"
}
object
success
boolean
error
string
errorType
string
details
string
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}
object
status
string
message
string
403
Forbidden
Permission Error
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}
object
success
boolean
error
string
Was this article helpful?