TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Allow only tokens with the delete scope

DELETEhttps://api.testingapis.com/api/auth/roles/resourceSign in to see this endpoint's URL

Header: Authorization: Bearer <token>. Only admin-token has the delete scope; user-token and readonly-token get 403.

Bearer token — admin-token

Responses

200
Token has the delete scope.
401
Token missing or not one of the test tokens.
403
Valid token without the delete scope.

Example

Request
curl -X DELETE "https://api.testingapis.com/api/auth/roles/resource" \
  -H "Authorization: Bearer admin-token" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
{
  "authorized": true,
  "user": "Alice Admin",
  "roles": ["admin", "user"],
  "scopes": ["read", "write", "delete"]
}

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.