Open Navigation

Authorization code

Note: The Tray GraphQL API is a backend API only and calls must be invoked server-side. Client-side Javascript calls to the API should not be made as they will be blocked by CORS. Our demo app (built using is a good illustration of how you can create a UI which presents an End User with their available Solutions while making all API calls server-side.

This mutation is used to generate the one-time authorization code which is required to allow a user to access the Configuration Wizard by appending it to the${partnerId}/configure/${solutionInstanceId}?code=${authorizationCode} url.

Required TokenNotes
Masterobtained from the Tray app UI

The mutation accepts the following as inputs:

userIdYesobtained when creating a user or querying a user
clientMutationIdNoOnly relevant if using the Relay GraphQL client

It can return the following data:

Returned DataNotes
authorizationCodethis is required to activate the Configuration Wizard
clientMutationIdOnly relevant if using the Relay GraphQL client

The following is a mutation which could be used in the GraphQL playground (please see Create Solution Instance for a javascript example)

mutation {
generateAuthorizationCode(input: {userId: "fbb96559-4d48-8e45-7yf4-5552c2d2fca4"}) {


"data": {
"generateAuthorizationCode": {
"authorizationCode": "490dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx674074"
Was this article helpful?