Search M2M Clients

POST
https://test.stytch.com/v1/m2m/clients/search

Search for M2M Clients within your Stytch Project. Submit an empty query in the request to return all M2M Clients.

The following search filters are supported today:

  • client_id: Pass in a list of client IDs to get many clients in a single request
  • client_name: Search for clients by exact match on client name
  • scopes: Search for clients assigned a specific scope

Body parameters


limitint

cursorstring

queryobject

Response fields


request_idstring

status_codeint

m2m_clientsarray[object]

results_metadataobject
const stytch = require('stytch');

const client = new stytch.B2BClient({
  project_id: 'PROJECT_ID',
  secret: 'SECRET',
});

const params = {
  limit: 10,
};

client.m2m.clients.search(params)
  .then(resp => { console.log(resp) })
  .catch(err => { console.log(err) });
RESPONSE
{
    "status_code": 200,
    "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
    "m2m_clients": [{...}, {...}, {...}],
    "results_metadata": {
        "next_cursor": null,
        "total": 1
    }
}

Common Error Types