> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.co-din.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How can I automatically set user nickname?

Articles on: [My Contacts](/en/category/my-contacts-4e84h7/)

If you are using Crisp on a website where users are authenticated, you may want to set their nickname so that they don't have to specify it when they start a chat with you.  
  
This method uses the Crisp JavaScript API, that you can call from your own code. Given that you know the authenticated user's nickname from your code, you'll be able to set it for the Crisp chatbox.  
  
Crisp lets you easily handle your [lead and contact management](https://crisp.chat/en/crm/) inside one tool.  
  
Here's how you would proceed to set the visitor's nickname:  
  

``` // Feed this call with your own internal nickname data. $crisp.push(["set", "user:nickname", ["John Doe"]]);```

  
  
Let's say you are using PHP, then use.  
  

``` ```

  
(assuming $user_nickname is your user fullname.).  
  
You can also combine this with your user email  
  

``` ```

  
  
Here's how you would proceed to get the visitor's nickname:  
  

``` // Read the value of the visitor nickname you previously set. var visitor_nickname = $crisp.get("user:nickname");```

  
  
Want to know more about the $crisp interface? Read: [How to use $crisp Javascript SDK?](https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/dollar-crisp/)

Updated on: 13/06/2022