vk-android-sdk icon indicating copy to clipboard operation
vk-android-sdk copied to clipboard

KError (API errorVKError (code: 15; ; Access denied: no access to call this method))

Open rangerhuangruihe opened this issue 4 years ago • 2 comments

I use the packagename com.vk.vktestapp and com_vk_sdk_AppId 3974615 of the test demo on com.vk:androidsdk:1.6.9 version, but it get this error response: VKError (API errorVKError (code: 200; ; Access denied)), may i ask if any other package param can I use to test the share funtion in VK SDK? I use such share function in 1.6.9 version:

void shareWithDialog(final Bitmap bitmap, FragmentManager fragmentManager) { VKPhotoArray photos = new VKPhotoArray(); photos.add(new VKApiPhoto("photo-47200925_314622346")); VKShareDialogBuilder builder = new VKShareDialogBuilder(); builder.setText("I created this post with VK Android SDK" + "\nSee additional information below\n#vksdk"); builder.setUploadedPhotos(photos); builder.setAttachmentImages(new VKUploadImage[]{ new VKUploadImage(bitmap, VKImageParameters.pngImage()) }); builder.setAttachmentLink("VK Android SDK information", "https://vk.com/dev/android_sdk"); builder.setShareDialogListener(new VKShareDialog.VKShareDialogListener() { @Override public void onVkShareComplete(int postId) { // recycle bitmap if need } @Override public void onVkShareCancel() { // recycle bitmap if need } @Override public void onVkShareError(VKError error) { // recycle bitmap if need } }); builder.show(fragmentManager, "VK_SHARE_DIALOG"); }

rangerhuangruihe avatar Jul 01 '20 03:07 rangerhuangruihe

hello, check it!

olegsm avatar Jul 09 '20 12:07 olegsm

Hi rangerhuangruihe,

We're sorry to have kept you waiting. I've checked your code and it works fine! Could you give us more information about the way you auth over VK SDK? I'm interested in params you send into VKSdk.login, especially scopes. Besides, it'll be great if you check your configuration on admins panel and configurations inside your project. Before that please check that your auth was successful and you really have permissions to this photo.

Make sure you specified that information:

  • [ADMIN PANEL] package name(eg. "com.example.vk")
  • [ADMIN PANEL] Your Main Activity with full path(eg. "com.example.vk.MainActivity")
  • [ADMIN PANEL] SHA1 key of your signing keystore file(eg. AD:91:97:3C:21:FE:21:D2:3D:9C:3E:71:AA:A7:BB:30:F1:B2:64:E4)
  • [PROJECT] com_vk_sdk_AppId integer resource(in your case <integer name="com_vk_sdk_AppId">3974615</integer>)

Best Regards, Andrew

AndrewChupin avatar Jul 20 '20 07:07 AndrewChupin