Skip to content

Commit c28f61a

Browse files
committed
docs(poh-api): remove rate limit
1 parent 1237d4c commit c28f61a

File tree

2 files changed

+59
-90
lines changed

2 files changed

+59
-90
lines changed

docs/get-started/how-to/verify-users-with-proof-of-humanity.mdx

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: Verify users with Proof of Humanity
3-
description: >-
4-
Use the Linea Proof of Humanity to verify and check the authenticity of your
5-
users.
3+
description: Use the Linea Proof of Humanity to verify and check the authenticity of your users.
64
image: /img/socialCards/verify-users-with-proof-of-humanity.jpg
75
---
86

@@ -122,7 +120,6 @@ Documentation [here](https://poh-api.linea.build/#/PoH/PohController_getOnePOHv2
122120
Once users have completed verification, you can confirm their Proof of Humanity status through an API call or onchain verification.
123121

124122
The APIs presented below are free to use, without any key or authentication.
125-
Please check the rate limits and usage guidelines below.
126123

127124
### Offchain verification
128125

@@ -139,38 +136,9 @@ curl https://poh-api.linea.build/poh/v2/0xc5fd29cC1a1b76ba52873fF943FEDFDD36cF46
139136
# Content-Type: text/plain;
140137
# Body: "true" | "false"
141138
```
142-
The response is raw text, not JSON.
143-
144-
**Rate limiting:**
145-
146-
The API is rate-limited to 5 requests per second per IP address.\
147-
Exceeding this limit will result in a `429` error.
148-
149-
An exponential backoff is recommended for handling rate limits if you expect high traffic or automated batch verification:
150-
151-
```typescript
152-
async function fetchWithBackoff(url: string, opts?: RequestInit, maxRetries = 5): Promise<Response> {
153-
let attempt = 0;
154-
while (true) {
155-
const res = await fetch(url, opts);
156-
if (res.status !== 429 || attempt >= maxRetries) return res;
157-
158-
const retryAfterHeader = res.headers.get("Retry-After");
159-
const retryAfterMs = retryAfterHeader ? Number(retryAfterHeader) * 1000 : undefined;
160-
161-
const base = 300;
162-
const jitter = Math.floor(Math.random() * 200);
163-
const backoffMs = retryAfterMs ?? base * 2 ** attempt + jitter;
164-
165-
await new Promise(r => setTimeout(r, backoffMs));
166-
attempt++;
167-
}
168-
}
169-
170-
const res = await fetchWithBackoff(`https://poh-api.linea.build/poh/v2/${address}`);
171-
```
172139

173140
**Response:**
141+
The response is raw text, not JSON.
174142

175143
- `false` = address does not have PoH status.
176144
- `true` = address has PoH status.

mlc_config.json

Lines changed: 57 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,58 @@
11
{
2-
"ignorePatterns": [
3-
{
4-
"pattern": "https://github.com"
5-
},
6-
{
7-
"pattern": "https://x.com"
8-
},
9-
{
10-
"pattern": "https://support.metamask.io"
11-
},
12-
{
13-
"pattern": "https://infura.io/faucet/linea"
14-
},
15-
{
16-
"pattern": "https://www.infura.io/faucet/linea"
17-
},
18-
{
19-
"pattern": "https://infura.io"
20-
},
21-
{
22-
"pattern": "https://rpc.sepolia.linea.build"
23-
},
24-
{
25-
"pattern": "https://help.coinbase.com"
26-
},
27-
{
28-
"pattern": "https://bridge.linea.build"
29-
},
30-
{
31-
"pattern": "https://goerli.etherscan.io"
32-
},
33-
{
34-
"pattern": "https://portfolio.metamask.io"
35-
},
36-
{
37-
"pattern": "https://docs.bitscrunch.com"
38-
},
39-
{
40-
"pattern": "https://docs.unleashnfts.com"
41-
},
42-
{
43-
"pattern": "https://unleashnfts.com"
44-
},
45-
{
46-
"pattern": "https://bitscrunch.com"
47-
},
48-
{
49-
"pattern": "https://app.bitscrunch.com"
50-
},
51-
{
52-
"pattern": "https://www.coingecko.com/en/api"
53-
},
54-
{
55-
"pattern": "https://dune.com/"
56-
},
57-
}
2+
"ignorePatterns": [
3+
{
4+
"pattern": "https://github.com"
5+
},
6+
{
7+
"pattern": "https://x.com"
8+
},
9+
{
10+
"pattern": "https://support.metamask.io"
11+
},
12+
{
13+
"pattern": "https://infura.io/faucet/linea"
14+
},
15+
{
16+
"pattern": "https://www.infura.io/faucet/linea"
17+
},
18+
{
19+
"pattern": "https://infura.io"
20+
},
21+
{
22+
"pattern": "https://rpc.sepolia.linea.build"
23+
},
24+
{
25+
"pattern": "https://help.coinbase.com"
26+
},
27+
{
28+
"pattern": "https://bridge.linea.build"
29+
},
30+
{
31+
"pattern": "https://goerli.etherscan.io"
32+
},
33+
{
34+
"pattern": "https://portfolio.metamask.io"
35+
},
36+
{
37+
"pattern": "https://docs.bitscrunch.com"
38+
},
39+
{
40+
"pattern": "https://docs.unleashnfts.com"
41+
},
42+
{
43+
"pattern": "https://unleashnfts.com"
44+
},
45+
{
46+
"pattern": "https://bitscrunch.com"
47+
},
48+
{
49+
"pattern": "https://app.bitscrunch.com"
50+
},
51+
{
52+
"pattern": "https://www.coingecko.com/en/api"
53+
},
54+
{
55+
"pattern": "https://dune.com/"
56+
}
57+
]
58+
}

0 commit comments

Comments
 (0)