question

nisar avatar image
nisar asked nisar commented

App doesn't have required permission: ORDERS_W

I am trying to get order object in Android application, but I am getting this error: I am testing application in Genymotion emulator. I have installed clover APK's from here.

com.clover.sdk.v1.ForbiddenException: App doesn't have required permission: ORDERS_W com.clover.sdk.v1.ServiceConnector.throwOnFailure(ServiceConnector.java:278) com.clover.sdk.v1.ServiceConnector.execute(ServiceConnector.java:213)

Orders
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

Mike M avatar image
Mike M answered nisar commented

Please verify that you correctly have applied permissions via the Edit App page. You can also always verify your current token's permissions via: {baseUrl}/v3/access_tokens/{token}

If you are using the SDK, you can fetch a token via CloverAuth.authernticate().

You probably need to uninstall and reinstall your app via the App Market to force a token resync with the updated permission set.

3 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.

nisar avatar image nisar commented ·

Thanks for your answer, I am installing app not from the Clover App market so that I have no option for Edit App page. I am testing in Genymotion emulator and installed clover developer APK's from here. CloverAuth.authernticate() results : {authToken=null, baseUrl=null}

0 Likes 0 ·
Mike M avatar image Mike M commented ·

Then how are you using CloverAuth.authenticate(...)? The only way to do so is if you are developing an app, and if you are simply sideloading an apk via ADB, it will not work without creating an app record (with applicable permissions). This is due to security compliance. Please see: https://docs.clover.com/build/android...

0 Likes 0 ·
nisar avatar image nisar commented ·

Thank you. It worked.

0 Likes 0 ·

Welcome to the
Clover Developer Community