Skip to main content
Question

Why Receiving StatusCode 401 in creating API user ?

  • March 25, 2024
  • 7 replies
  • 292 views

I’m in Benin, and searching through these pages, i have no answer. Can somebody help me. I got 401 even though i submitted the right suscription key.

{
"statusCode": 401,
"message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription."
}

 

7 replies

  • Active
  • March 26, 2024

ITs better you share the request code too so we can understand whcih subscriptiion key you submitted, and which endpoint you are trying to request.
Thank you.


  • Author
  • New Member
  • March 28, 2024

Thank you so mush @crankluga , I’m using postman to contact MTN API, the suscription key i’m using is the one i get from suscribing to collection product. But still getting same result in postman. I then used the one got from Disbursement product and it worked, so my my question, doesn’t it matter the suscription key i used, can i use disbursement key to access collection product without problem in the future ?


  • Active
  • March 28, 2024

I think maybe you intermixed / interchanged those subscription keys somewhere for sure.


  • New Member
  • April 5, 2024

Oh God, MTN why don't you fix this bug for good. Seeing all the compiling complaints from developers and still haven't come up with an eventual solution.

I also added the right credentials to create the API USER but still encountering 401 😠😠 regenerated the key even the UUID but still denies me access 401


  • Active
  • April 6, 2024

You are going to recreate the APIUSER and API KEy following the  link i have shared,,
there must be something small u are missing, 
kindly get but to us with your success or errror.
 

 


Forum|alt.badge.img
  • New Member
  • June 2, 2024

I use postman and I also keep encountering the same 401 error, even using the following URL:

https://sandbox.momodeveloper.mtn.com/v1_0/apiuser

 


Forum|alt.badge.img
  • New Member
  • June 3, 2024
Using the normal collection, other than the Widget collection, I also get the error.Now i use: Collections | Enable remote collection of bills, fees or taxes.This is Error:HTTP/1.1 500 Internal Server Errorcontent-length: 111content-type: application/jsonvary: Origin{    "statusCode": 500,    "message": "Internal server error",    "activityId": "b9726192-e18d-484c-a11e-f7ec3566efd2"}