GraphQL documentation details how partners can generate an API token for their channel customers using the Client API ID.
https://help.cloudhealthtech.com/graphql-api/#generate-an-api-token-using-the-client-api-id
SAMPLE REQUEST
mutation {
getAccessToken(input: {
refreshToken: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
customer: "crn:<partner_tenant_id>:msp_client/<msp_client_id>",
justification: "Justification text"
}){
accessToken
refreshToken
}
}
This query allows the partner to generate and API token for only one customer at a time.
Partners can generate API tokens for multiple channel customers by using a modified version of this query using aliases.
mutation {
Alias1: getAccessToken(input: {
refreshToken: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
customer: "crn:<partner_tenant_id>:msp_client/<api_client_id>"
justification: "Justification text"
}){
accessToken
refreshToken
}
Alias2: getAccessToken(input: {
refreshToken: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
customer: "crn:<partner_tenant_id>:msp_client/<api_client_id>"
justification: "Justification text"
}){
accessToken
refreshToken
}
Alias3: getAccessToken(input: {
refreshToken: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
customer: "crn:<partner_tenant_id>:msp_client/<api_client_id>"
justification: "Justification text"
}){
accessToken
refreshToken
}
}
This query sample uses aliases to individually get the API tokens for each customer. Aliases are user-defined and can be named anything the user prefers.
Alias naming examples: