Posts

Post marked as solved
2 Replies
746 Views
Hello, I am having trouble retrieving the Storefront ID for my Apple Music account using the API. I am using the following code to make a GET request to the /me/storefront endpoint: func getStoreFrontID(userToken: String) { let url = URL(string: "https://api.music.apple.com/v1/me/storefront")! var request = URLRequest(url: url) request.httpMethod = "GET" request.addValue("Bearer (userToken)", forHTTPHeaderField: "Authorization") let task = URLSession.shared.dataTask(with: request) { (data, response, error) in if let error = error { print("Error: \(error.localizedDescription)") return } guard let httpResponse = response as? HTTPURLResponse, (200...299).contains(httpResponse.statusCode) else { print("Error: Invalid HTTP response") if let data = data, let errorMessage = try? JSONSerialization.jsonObject(with: data, options: []) as? [String: Any], let message = errorMessage["errorMessage"] as? String { print("Error message: \(message)") } else { print("HTTP response: \(response.debugDescription)") } return } guard let data = data else { print("Error: No data received") return } do { let json = try JSONSerialization.jsonObject(with: data, options: []) if let dictionary = json as? [String: Any], let storefrontID = dictionary["defaultStorefront"] as? String { print("Store Front ID!: \(storefrontID)") } } catch { print("Error: \(error.localizedDescription)") } } task.resume() } The response I receive is a 403 error code with the following message: Invalid HTTP response HTTP response: Optional(<NSHTTPURLResponse: 0x283989460> { URL: https://api.music.apple.com/v1/me/storefront } { Status Code: 403, Headers {...}) I'm not sure what's causing this issue, as I have confirmed that my user token is valid and authorized for Apple Music. Is there any additional step I need to take in order to retrieve the Storefront ID? Any help would be greatly appreciated. Thank you.
Posted
by iAmBowser.
Last updated
.
Post not yet marked as solved
0 Replies
417 Views
Dear Apple Community, I am writing to express my extreme frustration and disappointment with the recent removal of positive reviews for my iOS application on the App Store. As a developer who has invested countless hours and resources into creating a quality app, I find it unacceptable that these reviews were removed without any justification or explanation. The positive reviews that were previously displayed on my app provided valuable feedback and validation for the hard work that I have put into creating a high-quality user experience. The sudden removal of these reviews, leaving only a negative 1-star rating, not only damages my app's reputation but also undermines the trust and confidence of potential users. I believe that this is a clear violation of the terms of service for the App Store, and I am deeply disappointed by Apple's apparent disregard for the hard work and dedication that developers like myself put into creating quality apps. The lack of transparency and communication regarding this issue is unacceptable and has caused significant damage to my app's reputation and my business. I am posting this message in the hope that it will bring attention to the issue and encourage Apple to take immediate action to rectify the situation. As a valued member of the Apple community, I expect to be treated with the respect and professionalism that I deserve. I urge Apple to provide a clear explanation for the removal of these reviews and take immediate steps to restore them to my app's rating. I also request that Apple improves its communication and transparency with developers regarding issues like this in the future. Thank you for your attention to this matter, and I hope that we can work together to improve the App Store for developers and users alike.
Posted
by iAmBowser.
Last updated
.