Discussions
Custom Messaging: Sending Messages with Attachments... but, how?
![](https://files.readme.io/9a49eec-image.png)
I have successfully obtained my uploadSignedUri and I now want to upload my attachment. How? the link in the documentation takes you to the "Generate Upload URI" so that's no help. I understand that to upload the attachment i POST multipart/formdata containing the attachment in the mediaFile field. when i do that, i get 400 "the request was rejected because no multipart boundary was found".
I have some working code to copy by Andrew Prokop and my non working code it very similar to his. He's using axios, which I believe abstracts some of the handling of formdata and so my pure javascript code is probably missing some details here - what details? this call appears to be completely undocumented.
I have tried a number of variations in the call and only succeeded in changing the error message.
my code runs client side and i've just picked the file with: x = showOpenFilePicker() off the local disk. i then have: x[0].getFile().then( f=>ulFile( text, f)); and (skipping obtaining the upload URL) in ulFile I have:
```
let formdata = new FormData();
formdata.append( 'mediaFile', f);
let ulOpts = {
method: 'POST',
headers: {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
},
body: formdata
}
console.log( "Media Upload to: " + ulObj.uploadSignedUri);
console.log( "Media Upload opts: " + JSON.stringify( ulOpts, undefined, 4));
fetch( ulObj.uploadSignedUri, ulOpts).then( r=> r.json()).then( o=> ulFile3( o));
```
Any ideas??
Posted by Nick Foad 3 days ago
Async Messaging: customer ends session: how to end agent session?
I have successfully developed a “chat” application using Async Messaging and an intermediary NodeJS service that allows a customer on a website to chat with an agent.
When the customer is done they want to end the session. I call Disconnect Dialog:
<https://developers.avayacloud.com/avaya-experience-platform/reference/disconnectproviderdialog>
which completes successfully but doesn’t end the agent session in Workspaces (as can be achieved using the chat sdk) – it apparently does nothing.
Is this the intended behavior, or a bug?
If it’s intended – how can I end the agent session?
![](https://files.readme.io/de89620-image.png)
Posted by Nick Foad 10 days ago
drop 67 API changes...?
according to the release notes drop 67 was supposed to include some additional API calls to allow create and update of engagements. all of drop 67 (and 68)'s content seems to have been delivered into production but I'm not seeing the new APIs in the documentation...
were the API changes pulled from the drop? or, is it just the documentation updates lagging behind the software release?
Posted by Nick Foad 16 days ago
errors using @avaya/axp-client-sdk-core
<https://avayaexperienceplatform.github.io/omni-sdk-js/modules/_avaya_axp_client_sdk_core.html> says to import as follows:
`import { AxpClientSdk } from '@avaya/axp-client-sdk-core';`
when i do that, i get:
`Uncaught SyntaxError: Cannot use import statement outside a module`
if i add type="module" to my script declaration, i get
`Uncaught TypeError: Failed to resolve module specifier "@avaya/axp-client-sdk-core". Relative references must start with either "/", "./", or "../`"
if i add "./" in front of "@avaya", i get:
`GET http://127.0.0.1:8080/@avaya/axp-client-sdk-core net::ERR_ABORTED 404 (Not Found)`
there's some trick to importing these sdks into my application but i can't work it out...
Posted by Nick Foad 24 days ago
Receiving a CORS issue when requesting an access token
I am writing a Workspaces widget that needs access to the customer journey API. I first need an access token that I'm getting from
<https://uk.api.avayacloud.com/api/auth/v1/[realm]/protocol/openid-connect/token>
Although I can call this fine from Postman, if I use it in a widget I'm getting CORS issues:
No 'Access-Control-Allow-Origin' header is present on the requested resource
Request header field access-control-allow-origin is not allowed by Access-Control-Allow-Headers in preflight response.
Request header field access-control-allow-methods is not allowed by Access-Control-Allow-Headers in preflight response
I have tried using your documentation at : <https://developers.avayacloud.com/avaya-experience-platform/reference/postgeneratetoken>, but it doesn't give any details on the CORS headers required so as it stands your APIs are unusable!
Please give me details of the request headers required to resolve this issue!
Posted by Nick Wright 2 months ago
How to specify Chat Integration Id in Chat APIs so that session/engagement created lands up on specific Integration Id
I have created a Chat Integration Id using **Default** Connector Type on my AXP Tenant: FCFSRQ
[block:image]
{
"images": [
{
"image": [
"https://files.readme.io/d77e200-image.png",
null,
null
],
"align": "center",
"border": true
}
]
}
[/block]
While using Chat APIs via Postman to create a chat session/engagement, I could not find any specific path or body parameter to ensure that the resultant engagement lands up on the above Integration Id that I have created. Earlier I thought **ChannelProviderId** would be the parameter which needs to be assigned specific Integration Id value for this to happen.
However regardless of any value (including random value) passed to ChannelProviderId, the resultant engagement/session always lands up at custom Chat Integration created by someone else on my tenant using **Chat** Connector type.
[block:image]
{
"images": [
{
"image": [
"https://files.readme.io/3c99ac6-image.png",
null,
null
],
"align": "center",
"border": true
}
]
}
[/block]
How can I test Chat APIs via Postman against my specific Chat Integration Id which I have created on my tenant?
Posted by Abhishek Rasal 3 months ago
WidgetAPI instantiation issues in Avaya Cloud Workspaces
Hi,
I have configured Workspaces to display custom Widget when the agent answers the call. Widget is getting displayed but unable to get the interaction id in the custom widget so could not instantiate the widgetAPI. Also some errors in the console when loading the widget. Its trying to load custom widget resource with the base URL of cloud workspace. Please help.
![](https://files.readme.io/5e13d20-image.png)
Posted by Nagendra Reddy 4 months ago
information about consulted party when doing a consultation call
When starting a consultation call, I can’t see in any event the details about the party I’m doing the consultation call with. Is there any specific event/field I should be looking at?
Posted by Horaci Macias 7 months ago
Widget SDK for Screen Pop UP
Is it possible to customize the pop up screen in AXP with Widget Framework?
Posted by null 7 months ago
AXP Chat SDK and Mobile Devices
When initiating a chat with a mobile device the chat container shifts to the right and has to be manually resized with each message. There appears to be "responsive" coding in place, but I cannot locate how it's called. There's conditional screen size settings of lg, md and sm in App.js:
const appContainerSize = ({size})=>{
if(size == "lg"){
return css`width:400px;height:${ensureHeightDontOverflowWindow(784)}px;`;
}
if(size == "md"){
return css`width:350px;height:${ensureHeightDontOverflowWindow(686)}px;`;
}
if(size == "sm"){
return css`width:350px;height:${ensureHeightDontOverflowWindow(588)}px;`;
Has anyone been able to ascertain where this code is invoked?
Posted by Harold Pfohl about 1 year ago