Pass received token to each request to private API as 'token' parameter or 'Authorization' header.
Name | Description |
---|---|
auth[username] | Login |
auth[password] | Password |
Version: HTTP/1.0 Accept: application/json Content-Type: application/json Host: example.org Cookie:
POST /api/rest/admin/auth
{"auth":{"username":"test-admin","password":"password"}}
X-Frame-Options: SAMEORIGIN X-XSS-Protection: 0 X-Content-Type-Options: nosniff X-Download-Options: noopen X-Permitted-Cross-Domain-Policies: none Referrer-Policy: strict-origin-when-cross-origin Content-Type: application/json; charset=utf-8 Vary: Accept ETag: W/"147e28e32f0be716ef2e92edc623a1d4" Cache-Control: max-age=0, private, must-revalidate X-Request-Id: e12acb4b-39e0-453f-9966-876710579677 X-Runtime: 0.006995 Content-Length: 111
201 Created
{ "jwt": "eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MzE1Nzg3NDcsInN1YiI6MjV9.KAwX57n19pY-qpS_OPL6fTWxHBVGYkO8hhHUBJwVNt0" }