agrumiro | 2022-03-25 10:10:48 UTC | #1
I'm trying to use https://developer.genesys.cloud/api/rest/client-libraries/web-messaging-java/ sdk in a custom java app. I developed the application following the instructions, however, when I run the application I receive the error: 403 Forbidden. Looking at the documentation it seems, I need an access_token, but it is not clear if this is a value I should generate or if there is an authentication process to follow to get the token.
Any idea?
Thank you
Laurent_Rustuel | 2022-03-25 16:46:07 UTC | #2
See Authorization page for details on how Genesys API rely on authorization to access resources. You can find more information on how to use authorization code
Regarding precisely web messaging, I think you can omit this param in the builder if you are not retrieving message from history, but I'd like someone else to confirm or deny this
vpirat | 2022-03-25 17:01:49 UTC | #3
Hi,
I don't think you need this access token. Web messaging is websocket based and does not use the Http bearer header for authorization. Getting a 403 means that you supplied invalid parameters. Check the deploymentId and/or the domain name supplied. Cross check with the deployment configuration (domain setting). Alternatively, you can test quickly manually if your settings are correct by using wscat tool:
wscat -o mydomain.com -c "wss://webmessaging.com/v1?deploymentId=123"
If that works then your parameters are correct and Sdk should be successful as well given you use the same inputs.
Regards, V.P.
agrumiro | 2022-03-26 06:25:57 UTC | #4
Thank you all, Problem was the host: using a deploymentId not available in the selected region, the system returns a wrong error code.
I changed the host, choosing the correct one, now it is working correctly.
system | 2022-04-25 06:25:58 UTC | #5
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 14034