mobile Platform Application Createmutation
mutation
2025-01release candidate
Requires
write_mobile_platform_applications
access scope. Please contact Shopify Support to enable this scope for your app.
Create a mobile platform application.
Arguments
The input to create a mobile platform application.
Was this section helpful?
MobilePlatformApplicationCreatePayload returns
Anchor to MobilePlatformApplicationCreatePayload.mobilePlatformApplicationmobilePlatform Application Created mobile platform application.
The list of errors that occurred from executing the mutation.
Was this section helpful?
Examples
Hide code
DescriptionCopy
mutation CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) { mobilePlatformApplicationCreate(input: $input) { mobilePlatformApplication { ... on AndroidApplication { id applicationId sha256CertFingerprints appLinksEnabled __typename } } userErrors { field message code } } }
curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) { mobilePlatformApplicationCreate(input: $input) { mobilePlatformApplication { ... on AndroidApplication { id applicationId sha256CertFingerprints appLinksEnabled __typename } } userErrors { field message code } } }", "variables": { "input": { "android": { "applicationId": "com.android.package", "appLinksEnabled": true, "sha256CertFingerprints": [ "A1:B2:C3:D4" ] } } } }'
const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) { mobilePlatformApplicationCreate(input: $input) { mobilePlatformApplication { ... on AndroidApplication { id applicationId sha256CertFingerprints appLinksEnabled __typename } } userErrors { field message code } } }`, { variables: { "input": { "android": { "applicationId": "com.android.package", "appLinksEnabled": true, "sha256CertFingerprints": [ "A1:B2:C3:D4" ] } } }, }, ); const data = await response.json();
session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY mutation CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) { mobilePlatformApplicationCreate(input: $input) { mobilePlatformApplication { ... on AndroidApplication { id applicationId sha256CertFingerprints appLinksEnabled __typename } } userErrors { field message code } } } QUERY variables = { "input": { "android": { "applicationId": "com.android.package", "appLinksEnabled": true, "sha256CertFingerprints": ["A1:B2:C3:D4"] } } } response = client.query(query: query, variables: variables)
const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `mutation CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) { mobilePlatformApplicationCreate(input: $input) { mobilePlatformApplication { ... on AndroidApplication { id applicationId sha256CertFingerprints appLinksEnabled __typename } } userErrors { field message code } } }`, "variables": { "input": { "android": { "applicationId": "com.android.package", "appLinksEnabled": true, "sha256CertFingerprints": [ "A1:B2:C3:D4" ] } } }, }, });
use Shopify\Clients\Graphql; $client = new Graphql("your-development-store.myshopify.com", $accessToken); $query = <<<QUERY mutation CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) { mobilePlatformApplicationCreate(input: $input) { mobilePlatformApplication { ... on AndroidApplication { id applicationId sha256CertFingerprints appLinksEnabled __typename } } userErrors { field message code } } } QUERY; $variables = [ "input" => [ "android" => [ "applicationId" => "com.android.package", "appLinksEnabled" => true, "sha256CertFingerprints" => ["A1:B2:C3:D4"], ], ], ]; $response = $client->query(["query" => $query, "variables" => $variables]);
Hide code
Input variables
Copy
{ "input": { "android": { "applicationId": "com.android.package", "appLinksEnabled": true, "sha256CertFingerprints": [ "A1:B2:C3:D4" ] } } }
Hide code
Response
JSON
{ "mobilePlatformApplicationCreate": { "mobilePlatformApplication": { "id": "gid://shopify/MobilePlatformApplication/1066176002", "applicationId": "com.android.package", "sha256CertFingerprints": [ "A1:B2:C3:D4" ], "appLinksEnabled": true, "__typename": "AndroidApplication" }, "userErrors": [] } }