- 21 Feb 2024
- 1 Minute to read
- Contributors
- Print
- PDF
Getting Audio Files
- Updated on 21 Feb 2024
- 1 Minute to read
- Contributors
- Print
- PDF
Getting Audio Files
If you are a customer who would like to receive the files stored in MinIO of Virtual Agent product it is possible to do it via necessary credentials.
As the first step to create or get API credentials please refer to the Step 0 here: API Documentation
- Client ID format here should be “va_external_dataservice_client_< TenantName >”
- Choose and add "dataservice_external API"
1. Get Token for Access
Sample token request body:
This is an example token request body, here you will enter the credentials you were given, and the URLs below are examples as well.
Base URL: https://eu.va.knovvu.com/
Identity URL: https://identity.eu.va.knovvu.com/
Token Endpoint: https://identity.eu.va.knovvu.com/connect/token
Method: POST
Parameters:
client_id: <your unique client id>
client_secret: <your unique client secret>
grant_type: client_credentials
scope: dataservice_external
After entering your credentials, click send and you will get a response body.
Sample response body:
{
"access_token": "your unique token",
"expires_in": 86400,
"token_type": "Bearer",
"scope": "dataservice_external"
}
2. Get File from Minio
The token should be entered in the Authorization part as Bearer Token.
In the Parameters part:
- Enter the key for the Minio file.
- IsVoiceOutput paramater could be true or false
true= if the voice file was generated from the orchestrator
false= if the voice file was sent from your side
Example request:
Method: GET
Endpoint: https://eu.va.knovvu.com/api/external/minio/audio?key=<your unique key>&tenantName=<tenantName>
Method: GET
Endpoint: https://eu.va.knovvu.com/api/external/minio?key=<your unique key>&isVoiceOutput=<true or false>
Example Response (v1.75 and above)
The response body will include the requested audio file, and Content-Type of the audio file will be included in response headers.
3. Write Voice File to Minio
The token should be entered in the Authorization part as Bearer Token.
In the Parameters part:
- Enter a unique key that you create (suggested format is 32 alphanumeric characters)
- IsVoiceOutput paramater must be "false"
In the Body section, add the file as form-data.
Example request:
Method: POST
Endpoint: https://eu.va.knovvu.com/api/external/minio?key=<your unique key>&isVoiceOutput=false
Example for the Body:
Response body would turn as "200 OK".