EAS update API supports setting of custom headers via Updates.setExtraParamAsync() but EAS hosted service can't utilise this

It is stated here that the API supports setting of the extra header params that EAS server can consider when serving up updates. A use case could be serving a preview feature based on an opt-in parameter set at app runtime: Updates - Expo Documentation.

EAS Update service does not provide a way to add a custom parameter to the branch mapping, so this API parameter cannot be used with the hosted service. Am I right in assuming so? Is this something that is on the feature roadmap or is custom update server the only way forward on using this?


Nick V

Hi Nick-

Currently, the EAS Update service only supports more complex branch mappings (ones with custom parameters and more complex logic) through our internal API. The ability to set these branch mappings via the CLI or a better-documented API or even the expo website is on our roadmap, but I don’t have an ETA as of this moment.

Custom update servers are definitely able to implement logic that processes the header, though I don’t believe I added an example to the custom update server example repo. It’s also not part of the protocol since it’s not required for core functionality of updates (a compliant expo-updates server and client can function fully without it). But it is something we plan to support more widely in the future for the EAS implementation of the protocol.

Hi Will,

Thanks for the response. Just wondering if there is any way for us to access the internal API, even if it is not well documented. We basically just need to set a custom header parameter and redirect to a particular branch based on the combination of a channel (e.g. production) and the custom parameter. If this is not possible, we would probably need to look at the custom server but that’s not ideal given it would be just to satisfy this one use case. Thanks again.

Nick V

Sure, it’s a GraphQL mutation for the updateChannel type. You can explore the GraphQL API using GraphiQL — Expo. The mutation you’re looking for is probably mutation.updateChannel. editUpdateChannel, but because this is undocumented it may change at any time. The branch mapping parameter format is also undocumented. It may be partially documented in the code in the eas-cli repo though.

I’ll talk to the team about prioritizing the generalized branch mapping editor in the EAS CLI, but as I mentioned before there’s no ETA at the moment.