write_fulfillments app scope update on existing stores not working

I have an app with some scopes and need to add the write_fulfillments

scope on already installed app without asking the store owners to uninstall and reinstall.

Have constructed the below url referring to guidance here,


[https://](https://{shop}.myshopify.com/admin/oauth/authorize?client_id={client_id}&scope={scopes}&redirect_uri={redirect_uri}&state={nonce}&grant_options[]={access_mode)<store>.myshopify.com/admin/oauth/authorize?client_id=<clientId>&scope=**write_fulfillments**&redirect_uri=<redi_uri>

and getting failure response as


{"message":"1 validation error detected: Value null at 'state' failed to satisfy constraint: Member must not be null"}

then I added the state and got the following failure response :


{"message":"Requester does not have a valid state to complete OAuth"}


Did the same experiment on multiple other scopes like write_third_party_fulfillment_orders and was successful redirected to the consent page (without the state in the URL).

Questions :

  1. Why is the url not redirecting for write_fulfillments scope while it is working for many other scopes like write_inventory, write_products, write_shipping, write_third_party_fulfillment_orders

  2. Why is url with **write_fulfillments** scope required to have a non null state ? while others didn’t require it.

I see there are some known issues (Ref) when updating the FulfillmentOrder scopes but does it also impact write_fulfillments scope ? and what is the workaround for it ?

  1. If state is mandatory for some reason for **write_fulfillments** scope addition how can i get the value of the state if i am generating the url outside of my app code.

I intend to email these reauth URLs to store owners so that they can get the write_fulfillments scope added. Please let me know if I am missing something.

Regards