1curl -X POST https://api.cloudflare.com/client/v4/user/tokens \2 -H "Authorization: Bearer <token>" \3 -H "Content-Type: application/json" \4 -d '{5 "name": "readonly token",6 "policies": [7 {8 "effect": "allow",9 "id": "f267e341f3dd4697bd3b9f71dd96247f",10 "permission_groups": [11 {12 "id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1",13 "name": "Load Balancers Write"14 }15 ],16 "resources": {17 "string": "string"18 }19 }20 ],21 "condition": {22 "request.ip": {23 "in": [24 "199.27.128.0/21"25 ],26 "not_in": [27 "199.27.128.0/21"28 ]29 }30 },31 "expires_on": "2020-01-01T00:00:00Z",32 "not_before": "2018-07-01T05:20:00Z"33}'
1{2 "result": {3 "value": "8M7wS6hCpXVc-DoRnPPY_UCWPgy8aea4Wy6kCe5T"4 }5}