List M-PIN IDs

Returns the list of M-PIN IDs for a project.

Endpoint Supported methods Full URL
/api/v1/projects/<YOUR_PROJECT_ID>/mpinids GET api.mpin.io/api/v1/projects/<YOUR_PROJECT_ID>/mpinids

# Endpoint Authentication

  • Basic - The Client ID and Client Secret are used as a username:password pair for the HTTP Basic authentication of the request.

    Authorization: "Basic <base64(<YOUR_CLIENT_ID:YOUR_CLIENT_SECRET>)>"
    

# Parameters

Name Type Required Description
projectId Path True Project ID
userId Query False User ID by which to filter the result set
deviceName Query False Device name by which to filter the result set
labels Query False Labels by which to filter the result set
revoked Query False Revocation status by which to filter the result set
offset Query False List offset
limit Query False List response limit

# Request Example

curl \
  --user "${YOUR_CLIENT_ID}:${YOUR_CLIENT_SECRET}" \
  "https://api.mpin.io/api/v1/projects/${YOUR_PROJECT_ID}/mpinids?userId=${USER_ID}&deviceName=${DEVICE_NAME}&labels=${LABELS}&revoked=false&limit=10&offset=0"

# Response Example

{
  "total": 1,
  "list": [
    {
      "mpinId": "c324f5e55e377de0343f37019ad5b77b8b01bdfee40014a54d76fd934e36a792",
      "projectId": "86cd3e64-f641-416a-bf80-64b9b7eef8ea",
      "userId": "test@example.com",
      "deviceName": "Chrome on Windows",
      "labels": ["<LABEL_A>", "<LABEL_B>"],
      "ip": "87.227.194.151",
      "country": "UK",
      "dvs": false,
      "createdAt": "2021-08-12T14:54:10.817054Z",
      "updatedAt": "2021-08-12T14:54:10.819274Z",
      "revoked": false
    }
  ]
}

# Errors

# UNAUTHORIZED

The request needs to be authenticated with valid Client ID and Client Secret. For more information, see the Endpoint Authentication section above.

{
  "error": "UNAUTHORIZED",
  "info": "Access not allowed due to invalid credentials."
}

# FORBIDDEN

The request has been authorised with credentials that lack permissions for the requested project.

{
  "error": "FORBIDDEN",
  "info": "The request is forbidden."
}

# INVALID_REQUEST_PARAMETERS

Missing or invalid parameters from the request. You can see the affected parameter(s) in the context of the error. For information about the possible parameters, see the Parameters section above.

{
  "error": "INVALID_REQUEST_PARAMETERS",
  "info": "Missing or invalid parameters from the request.",
  "context": {
    "params": "projectId"
  }
}

# METHOD_NOT_ALLOWED

The request was made using an incorrect HTTP method.

{
  "error": "METHOD_NOT_ALLOWED",
  "info": "The request method is not allowed."
}