Post

Replies

Boosts

Views

Activity

Reply to Getting a USER_CANCELLED token error while trying to authenticate using Apple MusicKit SDK
I'm having the same problem, on two different phones too. happened to me after I accidentally deleted apple music on one of the devices then reinstalled might be related, mind posting your code? Here's mine:private void authenticateApple(String token){ Intent intent = authenticationManager.createIntentBuilder(token) .setHideStartScreen(true) .setStartScreenMessage("Sign In") .build(); startActivityForResult(intent, REQUEST_CODE_APPLE_MUSIC_AUTH); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == REQUEST_CODE_APPLE_MUSIC_AUTH) { TokenResult result = authenticationManager.handleTokenResult(data); if (result.isError()) { TokenError error = result.getError(); Log.e("ERROR", "error:" + error.toString()); } else { editor.putString("music_user_token", result.getMusicUserToken()); editor.apply(); read_playlists(); } } else { super.onActivityResult(requestCode, resultCode, data); } }
Mar ’20