/AWS1/IF_WKR=>CREATEBOT()¶
About CreateBot¶
Creates a new bot in a specified Wickr network. Bots are automated accounts that can send and receive messages, enabling integration with external systems and automation of tasks.
Method Signature¶
METHODS /AWS1/IF_WKR~CREATEBOT
IMPORTING
!IV_NETWORKID TYPE /AWS1/WKRNETWORKID OPTIONAL
!IV_USERNAME TYPE /AWS1/WKRGENERICSTRING OPTIONAL
!IV_DISPLAYNAME TYPE /AWS1/WKRGENERICSTRING OPTIONAL
!IV_GROUPID TYPE /AWS1/WKRGENERICSTRING OPTIONAL
!IV_CHALLENGE TYPE /AWS1/WKRSENSITIVESTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wkrcreatebotresponse
RAISING
/AWS1/CX_WKRBADREQUESTERROR
/AWS1/CX_WKRFORBIDDENERROR
/AWS1/CX_WKRINTSERVERERROR
/AWS1/CX_WKRRATELIMITERROR
/AWS1/CX_WKRRESNOTFOUNDERROR
/AWS1/CX_WKRUNAUTHORIZEDERROR
/AWS1/CX_WKRVALIDATIONERROR
/AWS1/CX_WKRCLIENTEXC
/AWS1/CX_WKRSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_networkid TYPE /AWS1/WKRNETWORKID /AWS1/WKRNETWORKID¶
The ID of the Wickr network where the bot will be created.
iv_username TYPE /AWS1/WKRGENERICSTRING /AWS1/WKRGENERICSTRING¶
The username for the bot. This must be unique within the network and follow the network's naming conventions.
iv_groupid TYPE /AWS1/WKRGENERICSTRING /AWS1/WKRGENERICSTRING¶
The ID of the security group to which the bot will be assigned.
iv_challenge TYPE /AWS1/WKRSENSITIVESTRING /AWS1/WKRSENSITIVESTRING¶
The password for the bot account.
Optional arguments:¶
iv_displayname TYPE /AWS1/WKRGENERICSTRING /AWS1/WKRGENERICSTRING¶
The display name for the bot that will be visible to users in the network.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_wkrcreatebotresponse /AWS1/CL_WKRCREATEBOTRESPONSE¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createbot(
iv_challenge = |string|
iv_displayname = |string|
iv_groupid = |string|
iv_networkid = |string|
iv_username = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_genericstring = lo_result->get_message( ).
lv_botid = lo_result->get_botid( ).
lv_networkid = lo_result->get_networkid( ).
lv_genericstring = lo_result->get_username( ).
lv_genericstring = lo_result->get_displayname( ).
lv_genericstring = lo_result->get_groupid( ).
ENDIF.
Create bot successfully¶
Create bot successfully
DATA(lo_result) = lo_client->createbot(
iv_challenge = |SecureP@ssw0rd123|
iv_displayname = |Analytics Bot|
iv_groupid = |analytics_group|
iv_networkid = |12345678|
iv_username = |analytics_bot|
).
Create bot - username unavailable¶
Create bot - username unavailable
DATA(lo_result) = lo_client->createbot(
iv_challenge = |SecureP@ssw0rd123|
iv_displayname = |Support Bot|
iv_groupid = |default_group|
iv_networkid = |12345678|
iv_username = |support_bot|
).
Create bot - invalid username format¶
Create bot - invalid username format
DATA(lo_result) = lo_client->createbot(
iv_challenge = |SecureP@ssw0rd123|
iv_displayname = |Test Bot|
iv_groupid = |default_group|
iv_networkid = |12345678|
iv_username = |bot@invalid|
).