Delete user

Perform a DELETE request to the Authentication endpoint to delete the user record.

Only the owner of the data can delete it. This mechanism was implemented to prevent other authenticated users from updating other users data.

Note that Authentication endpoints are secured by default, so you have to include the Access token in the request.

Example:

// set this property in the request options:
{ credentials: 'include' } // using fetch
{ withCredentials: true } // using axios

Request data#

HTTP method: DELETE

URL format: https://baseUrl/versionNumber/customEndpointRoute/userEndpoint?key=apiKey&uniqueId=uniqueId

Example:

https://app.yawe.dev/api/1/ce/examples/auth?key=d59eb2859c284168ac48aef65046d5dd&uniqueId=lhgsdfisgdifgsiy47f7s47f

Request Cookies#

HeaderRequiredDescription
yawe_access_tokenYes

This token is obtained when doing a login. To automatically include it in the request you need to set the following property:

// using fetch
{ credentials: 'include' }
// using axios
{ withCredentials: true }

Request Parameters#

The following table describes the Request parameters.

ParameterDescriptionRequired
baseUrlBase url for calling the API.

Value: app.yawe.dev/api

Yes
versionNumberService version.

Value: The current value is 1.

Yes
customEndpointRouteThe route which identifies custom endpoints.

Default value: ce

Yes
userEndpointThe endpoint name generated by the user.

Value: the name created at https://app.yawe.dev

Yes
keyThe API Key of the project.Yes
uniqueIdThe identifier of the record to be updated.Yes
masterKeyOverrides the need for Access tokens or restrictions applied to Authentication endpoints.

Don't use this key in your client application.

For more information please refer to projects.

Value: the masterKey created at https://app.yawe.dev.

No

Response data#

Error codes#

Error codeDescription
400Possible reasons:
  • Endpoint or API Key not valid.
  • uniqueId is not present in the URL.
  • No record was found.
  • User is not the owner of the data.
401Possible reasons:
  • Missing Access Token.
  • Invalid credentials.
  • Token expired.
  • No user found.
403Missing API Key, not allowed origin or disallowed request without orign.

Successful response#

{
deleted: true,
message: 'Data deleted.'
}