Getting your Project Token
- Go to Settings and copy your Project Token (it starts with
rk-)
Using the Project Token
In Node.js, pass the token when creating the Retain client and the SDK handles authentication automatically. In other languages, include the token in each request using Authorization:Basic <token> with Content-Type: application/json.
The same token authorizes connected sources too, so if you are forwarding events from a tool like PostHog, this is the only credential you need there as well.
Next steps
Identify
Identify users in Retain.
Track
Record events for users.