question

sercanmobilist avatar image
sercanmobilist asked sercanmobilist answered

InventoryConnector createItem 403 FrobiddenException

I am trying to create an Item with InventoryConnector.

 var item:Item = Item()
   item.name = "TEST 1"
   item.alternateName = "TEST 1 ALTERNATIVE"
   item.price = 13

   item.priceType = PriceType.FIXED
   item.cost = 45
   item.categories = inventoryConnector.categories
   item.modifierGroups = inventoryConnector.modifierGroups
   item.taxRates = inventoryConnector.taxRates
   item.options = inventoryConnector.options
   item.code = "CODE 1"
   item.sku = "SJKU"

inventoryConnector.createItem(item)


but the error i got

"

Process: com.raklet.cloverentegration, PID: 7268

com.clover.sdk.v1.ForbiddenException: status code: 403 Permission denied

at com.clover.sdk.v1.ServiceConnector.throwOnFailure(ServiceConnector.java:331)

at com.clover.sdk.v1.ServiceConnector.execute(ServiceConnector.java:266)

at com.clover.sdk.v3.inventory.InventoryConnector.createItem(InventoryConnector.java:181)

at com.raklet.cloverentegration.ui.MembershipFragment$cloverAuth$2.invokeSuspend(MembershipFragment.kt:177)

at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)

at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)

at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)

at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)

at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)

at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

"


all my permissions are full but i still can't register.

I can create customers.

I can create employe.

I can create an order.

I can't create Item in inventory


Inventory
10 |2000

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

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

When you modify your app's permissions you need to uninstall and reinstall your app from the Clover dashboard for the permission changes to take affect.

8 comments
10 |2000

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

sercanmobilist avatar image sercanmobilist commented ·

I don't know how to remove the application from the upload section..


because the application is still in the "Pending Developer Approval" approval process.

Would you help me with this topic ?

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ sercanmobilist commented ·

Is this in Production? You should be testing your app in Sandbox.

0 Likes 0 ·
sercanmobilist avatar image sercanmobilist sercanmobilist commented ·

Actually, I did not make any permission changes on my application.

but I can try again.

I need to delete previous apk file from system. i don't know how to delete

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ sercanmobilist commented ·

Are you in sandbox or not? I see that you do have an app in sandbox, note, sandbox and production are separate environments. App and developer submissions/approval are NOT performed from sandbox. When you are ready to move your app to production you will need to create a production developer account - https://www.clover.com/developer-home/login?webRedirectUrl=%2Fdeveloper-home.. In sandbox you have full control of installing your app.

0 Likes 0 ·
Show more comments
sercanmobilist avatar image
sercanmobilist answered David Marginian Deactivated edited

You say that I can develop in a sandbox environment. But I can't develop. Could it be your problem?


I am using your emulators. your launcher. apk installed. your apps are installed.

But development is not done.


now

I can't develop applications in sandbox environment.

for that reason,

Do I need to publish an apk in the product environment?

do i do development after that?

1 comment
10 |2000

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

David Marginian avatar image David Marginian ♦♦ commented ·

I don't believe this is our problem.

"I can't develop applications in sandbox environment."

Isn't that what you are doing? You have a permissions issue, that doesn't mean you can't developer apps.

"Do I need to publish an apk in the product environment?"

Eventually to get your app approved you will need to create it and submit it for approval in production, this process is unrelated to your current permission problem.

For your current permissions problem you should re-follow all the steps you originally took when you first instlaled your app on the emulator. First you should uninstall your app via the Clover dashboard, re-install it, etc., here is another developer that had a similar issue - https://community.clover.com/questions/22295/inventoryconnector-getitems-comcloversdkv1forbidde.html.

0 Likes 0 ·
sercanmobilist avatar image
sercanmobilist answered David Marginian Deactivated edited

"Isn't that what you are doing? You have a permissions issue, that doesn't mean you can't developer apps."

I can't add items to the inventory area.!

How do I develop then?

Look

I am getting 403 error. What error is this? (com.clover.sdk.v1.ForbiddenException: status code: 403 Permission denied)

even though I got all my permissions inside the clover system.

Can you help me if you can see which permissions I have?

1 comment
10 |2000

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

David Marginian avatar image David Marginian ♦♦ commented ·

I am attempting to help you. As I have already indicated, this error occurs when you enable permissions AFTER you originally installed the app via the Clover dashboard. Your app did NOT originally have the inventory permission (I checked the history of the change in our database and it was added on 9/22 AFTER you installed the app). You will need to uninstall your app via the Clover dashboard and then re-install your app via the Clover dashboard for the permission change to take affect: https://community.clover.com/questions/22295/inventoryconnector-getitems-comcloversdkv1forbidde.html.

0 Likes 0 ·
sercanmobilist avatar image
sercanmobilist answered David Marginian Deactivated edited

now

I'm on the product side of the clover system.

I'm not going to the sandbox side.


I have an application.

-I'm releasing this application as a release, I'm turning it into an apk.

- I am creating an app with the "create your first app" option.

-In the App Type field, I select the options.

*https://ibb.co/yqc0Y1K

-i select all permissions

*https://ibb.co/pWhpH7R

-Merchant Availability

https://ibb.co/m0SZqsj

After getting all the permissions, I go and upload the apk.
where am i doing wrong here.

Is there a permit I didn't get?

Is there anything I am missing?




12 comments
10 |2000

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

David Marginian avatar image David Marginian ♦♦ commented ·

I assume you got it to work in sandbox? What is your question?

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ commented ·

What are you expecting? Do you have a production Clover device/merchant that you want to run your app on?

0 Likes 0 ·
sercanmobilist avatar image sercanmobilist David Marginian ♦♦ commented ·

I am writing an android application in emulator environment.

and what he's looking for

create customers.

create order

create inventory.

but i can't do that right now

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ sercanmobilist commented ·

Are you building an app for a single Clover merchant or are you building an app that you would like to have available in the Clover app market for all merchants? Either way all of our apps require approval a process that takes approximately 6 to 8 weeks.

0 Likes 0 ·
Show more comments
sercanmobilist avatar image
sercanmobilist answered

I found the cause of the 403 error.

When you start developing an application, you must first extract an apk and upload it to the sandbox environment, and then "submit" it and confirm it by clicking the connect button.

In this way, you can start developing in a healthy way.


Thank you for your support

10 |2000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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

Welcome to the
Clover Developer Community