import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun({
apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
});
const credential = await client.credentials.packages.credentials.create('packageName', {
credentialName: '26f1kl_-n-71',
fields: [{ fieldType: 'email', value: 'x' }],
});
console.log(credential.data);{
"success": true,
"message": "<string>",
"data": {
"userId": "<string>",
"packageName": "<string>",
"secretPath": "<string>",
"credentialName": "<string>",
"fields": [
{
"fieldType": "email",
"value": "<string>"
}
]
}
}import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun({
apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
});
const credential = await client.credentials.packages.credentials.create('packageName', {
credentialName: '26f1kl_-n-71',
fields: [{ fieldType: 'email', value: 'x' }],
});
console.log(credential.data);{
"success": true,
"message": "<string>",
"data": {
"userId": "<string>",
"packageName": "<string>",
"secretPath": "<string>",
"credentialName": "<string>",
"fields": [
{
"fieldType": "email",
"value": "<string>"
}
]
}
}Bearer token via Authorization header
3 - 50Credential created
true, false Show child attributes
Was this page helpful?