Solved

Authorisation

  • 5 October 2023
  • 13 replies
  • 209 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?

icon

Best answer by byaruhaf 5 October 2023, 12:48

View original

13 replies

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

Userlevel 1
Badge

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

 

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

 

Userlevel 1
Badge

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 
 

 

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

Userlevel 1
Badge

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 🤷🏾

I wish so 🙌
thank you anyway

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

Userlevel 1
Badge

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:

 

@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:

 

Userlevel 1
Badge

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

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

 

Thx @Malak.

It works.

Thx @byaruhaf  for support.

Reply