diff --git a/extensions/data-transfer/portability-data-transfer-apple/src/main/java/org/datatransferproject/datatransfer/apple/http/TokenRefresher.java b/extensions/data-transfer/portability-data-transfer-apple/src/main/java/org/datatransferproject/datatransfer/apple/http/TokenRefresher.java index 57e6c6547..47a428d3a 100644 --- a/extensions/data-transfer/portability-data-transfer-apple/src/main/java/org/datatransferproject/datatransfer/apple/http/TokenRefresher.java +++ b/extensions/data-transfer/portability-data-transfer-apple/src/main/java/org/datatransferproject/datatransfer/apple/http/TokenRefresher.java @@ -36,7 +36,10 @@ public static HttpRequest.Builder buildRefreshRequestUrlForAccessToken( TokensAndUrlAuthData authData, AppCredentials appCredentials) throws IllegalStateException { BodyPublisher postBody = buildRefreshRequestPostBody(authData, appCredentials); URI refreshUri = authData.getTokenServerEncodedUri(); - return HttpRequest.newBuilder().uri(refreshUri).POST(postBody); + return HttpRequest.newBuilder() + .uri(refreshUri) + .POST(postBody) + .header("content-type", "application/x-www-form-urlencoded"); } private static BodyPublisher buildRefreshRequestPostBody(