User Controller

Create New User (Web3 Auth Required)

Path: /api/users

Method: POST

Example Http Request

POST /api/users HTTP/1.1
Content-Type: application/json
X-WAL: 0x1234567890123456789012345678901234567890
X-SIG: 0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12
X-MES: VGVzdCBtZXNzYWdlIGZvciBhdXRoZW50aWNhdGlvbg==
Content-Length: 192
Host: localhost:8080

{
    "walletAddress": "0x9999888877776666555544443333222211110000",
    "email": "newuser@test.com",
    "displayName": "New Test User",
    "channelIds": ["ch_7NN3XMBK10D7ZHH06K7JQTEETP"]
}

Example Http Response

HTTP/1.1 403 Forbidden
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Allow-Headers: Origin, Content-Type, Accept, Authorization, Accept-Language, connection, Cache-Control, Access-Control-Request-Method, Access-Control-Request-Headers, X-SIG, X-WAL, X-MES
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD
Access-Control-Expose-Headers: Access-Control-Allow-Origin, Access-Control-Allow-Credentials
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl Request

$ curl 'http://localhost:8080/api/users' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'X-WAL: 0x1234567890123456789012345678901234567890' \
    -H 'X-SIG: 0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12' \
    -H 'X-MES: VGVzdCBtZXNzYWdlIGZvciBhdXRoZW50aWNhdGlvbg==' \
    -d '{
    "walletAddress": "0x9999888877776666555544443333222211110000",
    "email": "newuser@test.com",
    "displayName": "New Test User",
    "channelIds": ["ch_7NN3XMBK10D7ZHH06K7JQTEETP"]
}
'

User Controller