Authentication

MPush uses some HTTP headers to handle requests. In particular, are used to authenticate and to know which kind of data should expect from the client and vice versa.

All used headers are shown in the below table, but they can change based on which API you are calling.

Errors

MBurger APIs uses the following HTTP error codes:

Below are reported some examples of them:

On authentication error is returned an HTTP 401 and a JSON like this:

{
  "message": "The project token is not present."
}

On permission error is returned an HTTP 403 and a JSON like this:

{
  "message": "This action is unauthorized."
}

On validation error is returned an HTTP 422 and a JSON like this:

{
  "message": "The given data was invalid.",
  "errors": {
    "email": [
      "The token field is required."
    ]
  }
}

Last updated