Trello API: Errors getting members of an enterprise

When calling https://api.trello.com/1/enterprises/{enterprise-id}/members?fields=all&filter=userType+eq+%22member%22&sort=username we get the following error codes: 1001, 504, 429.

The user token is requested with read and account scopes and the user is an admin of the enterprise.

Calls to https://api.trello.com/1/members/me are successful and we can see the details about the user.

On the request with the 504 code we can see in the headers that we aren’t close to hitting rate limits, yet the following request is getting rate limited.

I’ve checked the documentation and can’t find anything about these codes as responses for those endpoints.

Any ideas about what might be going on?

What roles within Trello does a user need in order to have the token be able to access members of an enterprise?

Thanks!

1 Like

What is the error message in the response?

This sounds like you’re hitting one of the other limits documented here: Rate Limits

First attempt → resulting in 1001:

  "body": {
    "error": "Get \"https://api.trello.com/1/enterprises/{enterprise-id}/members?fields=all\u0026filter=userType+eq+%22member%22\u0026sort=username\": net/http: request canceled"
  },
  "status_code": 1001,

Second attempt → resulting in 504 (note the rate limit headers show that there are a lot of attempts remaining):


  "integrationName": "trello",
  "integrationType": "v2-resource",
  "body": "UmVzcG9uc2UgVGltZW91dA==",
  "status_code": 504,
  "body_size": 16,
  "headers": {
    "Date": [
      "Wed, 24 Aug 2022 15:30:02 GMT"
    ],
    "X-Permitted-Cross-Domain-Policies": [
      "none"
    ],
    "Set-Cookie": [
      "redacted"
    ],
    "X-Rate-Limit-Db-Query-Time-Interval-Ms": [
      "600000"
    ],
    "X-Rate-Limit-Api-Key-Interval-Ms": [
      "10000"
    ],
    "X-Rate-Limit-Member-Remaining": [
      "999"
    ],
    "Atl-Traceid": [
      "daf739bb6e01a252"
    ],
    "Access-Control-Allow-Methods": [
      "GET, PUT, POST, DELETE"
    ],
    "Content-Type": [
      "text/plain; charset=utf-8"
    ],
    "Expires": [
      "0"
    ],
    "X-Rate-Limit-Db-Query-Time-Max": [
      "7200000"
    ],
    "X-Rate-Limit-Member-Interval-Ms": [
      "10000"
    ],
    "X-Envoy-Ratelimited": [
      "1"
    ],
    "Content-Length": [
      "16"
    ],
    "X-Rate-Limit-Api-Token-Max": [
      "100"
    ],
    "X-Rate-Limit-Api-Token-Remaining": [
      "99"
    ],
    "X-Rate-Limit-Member-Max": [
      "1000"
    ],
    "Expect-Ct": [
      "report-uri=\"https://web-security-reports.services.atlassian.com/expect-ct-report/trello-edge\", max-age=86400"
    ],
    "X-Content-Type-Options": [
      "nosniff"
    ],
    "Report-To": [
      "{\"group\": \"endpoint-1\", \"max_age\": 600, \"endpoints\": [{\"url\": \"https://dz8aopenkvv6s.cloudfront.net\"}], \"include_subdomains\": true}"
    ],
    "X-Download-Options": [
      "noopen"
    ],
    "Surrogate-Control": [
      "no-store"
    ],
    "Pragma": [
      "no-cache"
    ],
    "X-Trello-Version": [
      "1.150589.0"
    ],
    "X-Rate-Limit-Api-Token-Interval-Ms": [
      "10000"
    ],
    "Server": [
      "globaledge-envoy"
    ],
    "Nel": [
      "{\"report_to\": \"endpoint-1\", \"max_age\": 600, \"include_subdomains\": true, \"failure_fraction\": 0.001}"
    ],
    "X-Frame-Options": [
      "DENY"
    ],
    "Referrer-Policy": [
      "strict-origin-when-cross-origin"
    ],
    "Cache-Control": [
      "no-store, no-cache, must-revalidate, proxy-revalidate"
    ],
    "Access-Control-Allow-Headers": [
      "Authorization, Accept, Content-Type"
    ],
    "X-Rate-Limit-Api-Key-Max": [
      "300"
    ],
    "X-Rate-Limit-Api-Key-Remaining": [
      "299"
    ],
    "Strict-Transport-Security": [
      "max-age=63072000; preload"
    ],
    "X-Xss-Protection": [
      "1; mode=block"
    ],
    "X-Dns-Prefetch-Control": [
      "off"
    ],
    "X-Trello-Environment": [
      "Production (Micros)"
    ],
    "Access-Control-Allow-Origin": [
      "*"
    ],
    "Access-Control-Expose-Headers": [
      "x-rate-limit-api-key-interval-ms, x-rate-limit-api-key-max, x-rate-limit-api-key-remaining, x-rate-limit-api-token-interval-ms, x-rate-limit-api-token-max, x-rate-limit-api-token-remaining"
    ],
    "X-Rate-Limit-Db-Query-Time-Remaining": [
      "7199990"
    ],
    "X-Envoy-Upstream-Service-Time": [
      "30032"
    ]
  },
  "url": "https://api.trello.com/1/enterprises/{enterprise-id}/members?fields=all\u0026filter=userType+eq+%22member%22\u0026sort=username",
  "host": "api.trello.com",
  "method": "GET",
  "path": "/1/enterprises/{enterprise-id}/members",
  "query": "fields=all\u0026filter=userType+eq+%22member%22\u0026sort=username",
  "scheme": "https",
  "additionalData": {}
}

Third attempt → resulting in 429:

{
  "integrationName": "trello",
  "integrationType": "v2-resource",
  "body": "VG9vIE1hbnkgUmVxdWVzdHM=",
  "status_code": 429,
  "body_size": 17,
  "headers": {
    "Strict-Transport-Security": [
      "max-age=63072000; preload"
    ],
    "Nel": [
      "{\"report_to\": \"endpoint-1\", \"max_age\": 600, \"include_subdomains\": true, \"failure_fraction\": 0.001}"
    ],
    "X-Permitted-Cross-Domain-Policies": [
      "none"
    ],
    "Cache-Control": [
      "no-store, no-cache, must-revalidate, proxy-revalidate"
    ],
    "Expires": [
      "0"
    ],
    "Content-Type": [
      "text/html; charset=utf-8"
    ],
    "X-Download-Options": [
      "noopen"
    ],
    "Surrogate-Control": [
      "no-store"
    ],
    "X-Trello-Environment": [
      "Production (Micros)"
    ],
    "X-Xss-Protection": [
      "1; mode=block"
    ],
    "Atl-Traceid": [
      "947d8ebbb9b4e987"
    ],
    "Access-Control-Allow-Methods": [
      "GET, PUT, POST, DELETE"
    ],
    "Access-Control-Expose-Headers": [
      "x-rate-limit-api-key-interval-ms, x-rate-limit-api-key-max, x-rate-limit-api-key-remaining, x-rate-limit-api-token-interval-ms, x-rate-limit-api-token-max, x-rate-limit-api-token-remaining"
    ],
    "X-Envoy-Upstream-Service-Time": [
      "10"
    ],
    "Content-Length": [
      "17"
    ],
    "Pragma": [
      "no-cache"
    ],
    "Report-To": [
      "{\"group\": \"endpoint-1\", \"max_age\": 600, \"endpoints\": [{\"url\": \"https://dz8aopenkvv6s.cloudfront.net\"}], \"include_subdomains\": true}"
    ],
    "X-Frame-Options": [
      "DENY"
    ],
    "X-Trello-Version": [
      "1.150589.0"
    ],
    "Access-Control-Allow-Origin": [
      "*"
    ],
    "Retry-After": [
      "846"
    ],
    "Server": [
      "globaledge-envoy"
    ],
    "Expect-Ct": [
      "report-uri=\"https://web-security-reports.services.atlassian.com/expect-ct-report/trello-edge\", max-age=86400"
    ],
    "X-Content-Type-Options": [
      "nosniff"
    ],
    "Date": [
      "Wed, 24 Aug 2022 15:30:04 GMT"
    ],
    "Referrer-Policy": [
      "strict-origin-when-cross-origin"
    ],
    "Set-Cookie": [
      "redacted"
    ],
    "X-Dns-Prefetch-Control": [
      "off"
    ],
    "Access-Control-Allow-Headers": [
      "Authorization, Accept, Content-Type"
    ]
  },
  "url": "https://api.trello.com/1/enterprises/{enterprise-id}/members?fields=all\u0026filter=userType+eq+%22member%22\u0026sort=username",
  "host": "api.trello.com",
  "method": "GET",
  "path": "/1/enterprises/{enterprise-id}/members",
  "query": "fields=all\u0026filter=userType+eq+%22member%22\u0026sort=username",
  "scheme": "https",
  "additionalData": {}
}