Project ID
The Project ID is consumed through URL parameters. URL parameters used:projectId: Your Project ID can be obtained from dashboard.reown.com
https://relay.walletconnect.com/?projectId=c4f79cc821944d9680842e34466bfbd
This can be instantiated from the client with the projectId in the SignClient constructor.
Allowlist
To help prevent malicious use of your project ID you are strongly encouraged to set an allowlist of origins or application/bundle ids for mobile applications where the project ID is used. Requests from other origins will be denied.- Allowlist supports a list of origins in the format
[scheme://]<hostname[:port]. - Application ID/Bundle IDs typically are defined using the reverse domain name notation
localhost (or 127.0.0.1) is always permitted, and if empty all origins are allowed. Updates take 15 minutes to apply.
If scheme or port is specified, it must match exactly. Hostname must also match exactly, but wildcards can be used for individual labels within the hostname.
Example of possible origins in the allowlist:
example.com- allowshttps://example.comorhttp://example.combut nothttps://www.example.comhttps://example.com- allowshttps://example.combut nothttp://example.comhttps://www.example.com- allowshttps://www.example.combut nothttps://example.comhttps://example.com:8080- allowshttps://example.com:8080but nothttps://example.comhttps://*.example.com- allowshttps://www.example.combut nothttps://example.comhttps://*.*.example.com- allowshttps://www.subdomain.example.combut nothttps://www.example.comorhttps://example.comhttps://www.*.example.com- allowshttps://www.subdomain.example.combut nothttps://www.example.comhttps://www-*.example.com- invalid;*must be the full label
Error Codes
| Reason | Error Code |
|---|---|
| Project ID doesn’t exist OR JWT is expired | 401 |
| Exists and is invalid | 403 |
| Too many requests | 1013 |
Websocket Close Codes
| Code | Description | Reconnect |
|---|---|---|
| 1001 | Server terminating | Yes |
| 4008 | Client stale: connected without a prior subscription and is not sending data | When needed |
| 4010 | Load Rebalancing | Yes |
Best Practices
- Create a new
projectIdfor each project. This allows for more granular control, dedicated explorer listings, and project metrics. - Don’t reuse a
projectId. - Use the AllowList to limit unauthorized usage.
- Avoid committing projects keys to the repo. Use env variables instead.