I think you need the client_id in this body as well, so something like this:
{
		"client_id":"com.domain.app", // App Bundle ID or Service ID
		"grant_type":"authorization_code",
		"code":"test",
		"redirect_uri":"https://example.com",
		"client_secret":"eyHrt*****"
}
More info can be found here - https://developer.apple.com/documentation/sign_in_with_apple/generate_and_validate_tokens.
Topic:
App & System Services
SubTopic:
General
Tags: