-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2001.html
More file actions
152 lines (148 loc) · 7.11 KB
/
2001.html
File metadata and controls
152 lines (148 loc) · 7.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><text x='16' y='24' font-family='system-ui,sans-serif' font-size='22' font-weight='700' fill='%23f85149' text-anchor='middle'>!</text></svg>">
<title>Error 2001: Invalid Initiator Information (B2C / B2B) | Daraja M-Pesa Error Reference</title>
<meta name="description" content="Invalid Initiator Information (B2C / B2B): The API operator credentials sent in a B2C or B2B request are invalid. This is a developer-side credential error">
<meta name="robots" content="index, follow, max-snippet:-1">
<link rel="canonical" href="https://ronnyabuto.github.io/daraja-error-codes/2001.html">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "TechArticle",
"headline": "Error 2001: Invalid Initiator Information (B2C / B2B)",
"description": "The API operator credentials sent in a B2C or B2B request are invalid. This is a developer-side credential error, not a user PIN error.",
"dateModified": "2026-03-24",
"url": "https://ronnyabuto.github.io/daraja-error-codes/2001.html",
"author": {
"@type": "Person",
"name": "Ronny Nyabuto"
},
"publisher": {
"@type": "Organization",
"name": "Daraja Error Codes",
"url": "https://ronnyabuto.github.io/daraja-error-codes"
},
"about": [
{
"@type": "Thing",
"name": "Safaricom Daraja API"
},
{
"@type": "Thing",
"name": "B2C"
}
],
"keywords": "daraja error 2001, mpesa error 2001, b2c error"
}
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Daraja Error Codes",
"item": "https://ronnyabuto.github.io/daraja-error-codes/"
},
{
"@type": "ListItem",
"position": 2,
"name": "Error 2001: Invalid Initiator Information (B2C / B2B)",
"item": "https://ronnyabuto.github.io/daraja-error-codes/2001.html"
}
]
}
</script>
<style>
*, *::before, *::after { box-sizing: border-box; }
body {
margin: 0; padding: 0;
background: #f5f5f5;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
color: #222; line-height: 1.6;
}
.container { max-width: 720px; margin: 0 auto; padding: 40px 20px 60px; }
.back { font-size: 13px; color: #0066ff; text-decoration: none; display: inline-block; margin-bottom: 24px; }
.back:hover { text-decoration: underline; }
.card { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 28px; }
.card-top-row {
display: flex; align-items: center; justify-content: space-between;
flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.code { font-family: monospace; font-size: 26px; font-weight: 700; color: #0066ff; }
.api-badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 12px; white-space: nowrap; }
.api-stk-push { background: #fff3cd; color: #856404; }
.api-http { background: #f8d7da; color: #721c24; }
.api-c2b { background: #d1ecf1; color: #0c5460; }
.api-b2c { background: #d4edda; color: #155724; }
.api-go-live { background: #e2d9f3; color: #4a235a; }
h1 { font-size: 22px; font-weight: 700; margin: 0 0 12px; color: #111; }
p { font-size: 14px; color: #444; margin: 0 0 8px; }
.section-label {
font-size: 11px; font-weight: 700; text-transform: uppercase;
letter-spacing: 0.08em; color: #666; margin-top: 18px; margin-bottom: 6px;
}
ul { margin: 6px 0; padding-left: 20px; font-size: 14px; color: #444; }
ul li { margin-bottom: 4px; }
.fix-text {
background: #f0fff4; border-left: 3px solid #28a745;
padding: 10px 14px; border-radius: 0 6px 6px 0;
font-size: 14px; margin: 0; color: #333;
}
.notes-text {
background: #fff8e1; border-left: 3px solid #ffc107;
padding: 10px 14px; border-radius: 0 6px 6px 0;
font-size: 13px; color: #555; margin: 0;
}
.related-list { list-style: none; padding: 0; margin: 6px 0; }
.related-list li { margin-bottom: 4px; }
.related-list a { color: #0066ff; text-decoration: none; font-size: 14px; font-weight: 500; }
.related-list a:hover { text-decoration: underline; }
.page-footer { margin-top: 32px; font-size: 13px; color: #888; text-align: center; }
.page-footer a { color: #0066ff; text-decoration: none; }
.page-footer a:hover { text-decoration: underline; }
@media (max-width: 600px) {
.card-top-row { flex-direction: column; align-items: flex-start; }
.code { font-size: 20px; }
}
</style>
</head>
<body>
<div class="container">
<a href="https://ronnyabuto.github.io/daraja-error-codes/" class="back">← All Daraja Error Codes</a>
<div class="card">
<div class="card-top-row">
<span class="code">2001</span>
<span class="api-badge api-b2c">B2C</span>
</div>
<h1>Invalid Initiator Information (B2C / B2B)</h1>
<p>The API operator credentials sent in a B2C or B2B request are invalid. This is a developer-side credential error, not a user PIN error.</p>
<div class="section-label">Likely Causes</div>
<ul>
<li>InitiatorName does not match what is registered on the Daraja portal</li>
<li>SecurityCredential was encrypted using the wrong certificate (e.g. old G2 certificate instead of the Daraja certificate)</li>
<li>SecurityCredential was encrypted using sandbox certificate in production or vice versa</li>
<li>Initiator does not belong to the shortcode being used</li>
</ul>
<div class="section-label">Fix</div>
<p class="fix-text">Download a fresh copy of the public key certificate from your Daraja portal (not from a GitHub repo — those are often outdated G2 certificates). Re-encrypt your initiator password using that certificate and update your SecurityCredential value. Also verify the InitiatorName matches exactly what is on the Daraja portal under your app credentials.</p>
<div class="section-label">Notes</div>
<p class="notes-text">Do not confuse this with the STK Push 'Invalid Initiator Info' entry — that one is about a user entering the wrong PIN. This error code 2001 appears in B2C and B2B result callbacks and is entirely a developer credentials issue.</p>
<div class="section-label">Related Errors</div>
<ul class="related-list">
<li><a href="500.001.1001.html">Error 500.001.1001: Wrong Credentials / MerchantValidate Failed</a></li>
<li><a href="400.002.02.html">Error 400.002.02: Bad Request — Invalid Request Parameter</a></li>
</ul>
</div>
<p class="page-footer">
Part of the <a href="https://ronnyabuto.github.io/daraja-error-codes/">Daraja Error Code Reference</a> —
open source on <a href="https://github.com/ronnyabuto/daraja-error-codes" target="_blank" rel="noopener">GitHub</a>.
</p>
</div>
</body>
</html>