Skip to main content
Solved

Authorisation

  • October 5, 2023
  • 15 replies
  • 465 views

Good morning team, I hope you are doing great. I am having some concerns if you can help me:
What is the role of bc-authorize and CreateOauth2Token ? (I didn’t understand how it happens in real time, or what is its use).
what is the difference between CreateOauth2Token and CreateAccessToken?
Why do I need bc-authorize and CreateOauth2Token if I can make my requests only with CreateAccessToken?

Best answer by byaruhaf

To understand the flow of any of these API’s go to the use cases and select what you want to do it will list out your flow 
 


Example: RequesttoPay
The image below shows you how to accomplish the use case 


 Example: Get consumer information with consent
The image below shows you how to accomplish the use case 

There is even and image showing you how it will flow 

 


So for anything check the Use Cases and follow the order. 

https://momodeveloper.mtn.com/api-documentation/use-cases

 

15 replies

  • Author
  • Active
  • October 5, 2023

@byaruhaf @Ddamula @Harold Rwothomio any help please 🙏🏻


byaruhaf
Forum|alt.badge.img
  • Helpful
  • Answer
  • October 5, 2023

To understand the flow of any of these API’s go to the use cases and select what you want to do it will list out your flow 
 


Example: RequesttoPay
The image below shows you how to accomplish the use case 


 Example: Get consumer information with consent
The image below shows you how to accomplish the use case 

There is even and image showing you how it will flow 

 


So for anything check the Use Cases and follow the order. 

https://momodeveloper.mtn.com/api-documentation/use-cases

 


  • Author
  • Active
  • October 5, 2023

Thank you so much Franklin.
But there are some cases that don’t exist. Are they under development? 

 


byaruhaf
Forum|alt.badge.img
  • Helpful
  • October 5, 2023

Wellcome Malak, which use case dont exist ?


Are you talking about Select API, that’s an instruction to select an API from the drop down.
 

or

are you talking about Merchant payment with consumer consent the use case is described in the image below 
 

 


  • Author
  • Active
  • October 5, 2023

Yes exactly I am talking about the one in the image, where is the corresponding endpoint?


byaruhaf
Forum|alt.badge.img
  • Helpful
  • October 5, 2023

Yap I only see the first 3 End points.

 MerchantTransferWithConsent does not appear to be part of the sandbox server, I see the endpoint in the image. but nothing in the sandbox. I guess it is live server only. maybe some one from the Momo team can confirm 🤷🏾


  • Author
  • Active
  • October 5, 2023

I wish so 🙌
thank you anyway


  • New Member
  • October 5, 2023

Hi @byaruhaf,

I’m trying to make a POST to 

According to the documentation, the payload should look like this:

 

Please could you provide an exemple of each placeholder? I’m confused.

can the SCOPE be anything?

 

This is what I entered on Postman

Thanks for your support


byaruhaf
Forum|alt.badge.img
  • Helpful
  • October 6, 2023

Hi @anicet  It's always best to initiate a new question in a separate thread. This way, if others have a similar query, it becomes easier to locate answers. 
 

In my situation, I find success when the scope is “profile”, rather than anything else.

Example:
login_hint=ID:46733123453/MSISDN&scope=profile&access_type=online

 

Example:

 


  • New Member
  • October 6, 2023

@byaruhaf Thx for reply, next time I’ll initiate a new question. My bad!

Unfortunately I still have a Bad-Request

I can't see the cause of the problem.

This is the Authorisation:

This is my Payload:

This are the header parameters.

 

And this is the response:

 


byaruhaf
Forum|alt.badge.img
  • Helpful
  • October 6, 2023

@anicet  I think you should test it on the website first using the Try it option 


  • Author
  • Active
  • October 8, 2023

@anicet, hello, 
i think because you are using basic authentication, here is my request:
 

 


  • New Member
  • October 11, 2023

Thx @Malak.

It works.

Thx @byaruhaf  for support.


  • New Member
  • October 25, 2024

I am trying the bc_authorize endpoint on disbursement, I have primarily all the required headers and body but I keep getting a 401 authorized response in the api website (sandbox) and also Postman. what could be the reason?
I fixed it, the issue was because the token had expired and had to generate a new token.
now I am trying to use the CreateAuth2Token endpoing. I have supplied the necessary headers, along with the auth_req_id I recieved from the bc_authorize but I am getting a 400 status error without any message.

 

 


  • New Member
  • October 25, 2024

Yap I only see the first 3 End points.

 MerchantTransferWithConsent does not appear to be part of the sandbox server, I see the endpoint in the image. but nothing in the sandbox. I guess it is live server only. maybe some one from the Momo team can confirm 🤷🏾

There was no response to this question, indeed where is the endpoint for this, if it is not available on sandbox, I am sure there should be an endpoint for production.
MerchantTransferWithConsent: ???