Obaid avatar image
Obaid asked sam Deactivated commented

How to get Authorization Bearer against merchant id


How can I create the Authorization Bearer against merchant id, I know there is the OAuth documentation there , but can you please give me any example or piece of code.

I have this query string when merchant launch my app.
API TokenAuth
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Miguel avatar image
Miguel Deactivated answered sam Deactivated commented
The next step would be to send another request{appId}&client_secret={appSecret}&code={codeUrlParam}
  • App ID: Your app's id
  • App Secret: You can get this from your application dashboard
  • Code: You get this from the previous response you received
On a succesful request, the response will include the API token that can be used to make subsequent API calls.

All of this is documented in our OAuth docs:
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @miguel

Thanks for your reply, I got the API token from below url, I triedyour given URL but it is not working.{appId}&client_secret={appSecret}&code={codeUrlParam}

Well now I am facing 1 last problem :)

When I am fetching the employees list by predefined token it is working fine, but when I am going to fetch the employees list by that token which is generated by Access Token Method (OAuth above method) I got the error 401 Unauthorized.

0 Likes 0 ·

You need to make sure the app that's generating the OAuth has the correct permissions.

Here's a quick video of how to build a WebApp with OAuth.

0 Likes 0 ·

Welcome to the
Clover Developer Community