crisp-im / node-crisp-api

:zap: Crisp API Node Wrapper
https://docs.crisp.chat/guides/rest-api/
MIT License
99 stars 38 forks source link

How to get "identifier" and "key" for using some methods in "user" tier #42

Closed ehsan-mohammadi closed 2 years ago

ehsan-mohammadi commented 2 years ago

Hello to the Crisp team! I have a problem with the Crisp REST API. When I do https://api.crisp.chat/v1/website POST request in the user tier, it responds to me with 401 Unauthorized code. I know it occurs because I use identifier and key that generated for the plugin tier. But, how can I get identifier and key for user tier?

Regards

eliottvincent commented 2 years ago

Hey!

First you need to create a dedicated operator on Crisp, for example "API account". That way it doesn't conflict with regular operators. Then, you can log in on app.crisp.chat with this account, open your developer and check the cookie user_session for "https://app.crisp.chat". It contains the identifier and key.

ehsan-mohammadi commented 2 years ago

@eliottvincent Many thanks for helping me! That solved my problem