Important

We are updating the images for OroCommerce version 6.1 to align with the latest changes in the back-office design. During this transition, some images may still show older versions. Thank you for your patience as we work to update all visuals to reflect these changes.

CLI Commands (StorefrontAgentBundle) 

oro:ai-agent:access-token:create 

Creates an OAuth2 access token for the specified customer user for the Smart Agent microservice for development or testing purposes.

php bin/console oro:ai-agent:access-token:create

Commands in Use (Examples) 

The following example runs the creation of an OAuth2 access token for customer user Amanda and returns the result in JSON format:

php bin/console oro:ai-agent:access-token:create --current-customer-user=1 --format=json

The output would be as follows:

{
    "customer_user_identifier": "1",
    "access_token": "access token hash",
    "client_name": "Oro Agent Client"
}

The following example runs the creation of an OAuth2 access token for customer user Amanda and returns the result in text format:

php bin/console oro:ai-agent:access-token:create --current-customer-user=1

The output would be as follows:

OAuth2 Access Token
-------------------
* customer_user_identifier: 1
* access_token: access token hash
* client_name: Oro Agent Client