POSTMAN:
ACCESS_TOKEN obtained:
POST: https://api.domo.com/oauth/token
data = {
"grant_type": "client_credentials",
"scope": "data" # "data dashboard workflow user"
},
auth = {CLIENT_ID,CLIENT_SECRET}
CodeEngine Called:
POST:
url: https://company.domo.com/api/codeengine/v2/packages/35233147-8c17-420d-8f48-2754ae6108ea/versions/3.0.1/functions/shareCardWithPerson
headers = {
"X-DOMO-Developer-Token": access_token,
"Content-Type": "application/json"
}
body = {
"inputVariables": {
"person": 994139312,
"card_id": 908077640
},
"settings": { "getLogs": true
}
}
Error:
{
"status": 401,
"statusReason": "Unauthorized",
"path": "/api/codeengine/v2/packages/35233147-8c17-420d-8f48-2754ae6108ea/versions/3.0.1/functions/shareCardWithPerson",
"message": "Full authentication is required to access this resource",
"toe": "REDACTED"
}
I have used the sendEmail function just fine simply using the access_token generated from Domo admin. This token didn't work so I read I needed to generate one using the method explained above, however this also hasn't worked.