New to canvas LTI.
Trying to implement a basic launch to see what data parameters LMS(canvas) will be send to my endpoint.
Before that:
Created a Developer Key from canvas. Noted the client ID
Went to settings -> apps -> add app -> by client ID and used the ID from step 1.
Went to a course -> add a module -> Add item to module(external tool) selected my app created in step 2.
Click on the App link(launch) and gets the following error:
{"message": "Could not parse request body into json: Could not parse payload into json: Unrecognized token \'iss\': was expecting (JSON String, Number, Array, Object or token \'null\', \'true\' or \'false\')\n at [Source: (byte[])\"iss=https%3A%2F%2Fcanvas.instructure.com&login_hint=ce958d31919f77ad0ef5e7e928e5ea087b35944d&client_id=10000000000010&target_link_uri=https%3A%2F%2Fmaster.d1z84s1ajfpa4v.amplifyapp.com<i_message_hint=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXJpZmllciI6IjM1NGQ4YWRkMzdmZTBmOWM0NzFlZTc2YTdhOGNmY2ZmYTg3NTdlNDJmMDZmODBjZGU1NDg2YWQ0ZTE2YjE0NjU2NjMxMDU3OThlNzY3YzY1NTg0NTM2MTQ5ZTk5NWM4YjM0NzFmYzg5ZDA3YjU1OWI4MTQ4NDZkOGM5MmQwZjA1IiwiY2FudmFzX2RvbWFpbiI6IjUyLjQ1LjIzOS4yMzQiLCJjb250ZXh0X3R5cGUiOiJDb3Vyc\"[truncated 166 bytes]; line: 1, column: 5]"}
The docs are really not helping me, So here seeking for some help, please correct me If I am wrong or missed any steps.
Related
I have created a template in docusign web and using its template id, i am calling the function from iOS SDK.
TemplatesManager.sharedInstance.displayTemplateForSignature(templateId: templateId, controller: self, tabData: tabData, recipientData: recipientData, customFields:customFields, onlineSign: onlineSign, attachmentUrl: attachmentUrl) { (controller, errMsg) in
print(errMsg)
}
The recipient data i am sending is
let recipientDatum = DSMRecipientDefault()
// Use recipient roleName (other option to use recipient-id) to find unique recipient in the template
recipientDatum.recipientRoleName = "Client"
recipientDatum.recipientSelectorType = .recipientRoleName
recipientDatum.recipientType = .inPersonSigner
// In-person-signer name
recipientDatum.inPersonSignerName = "Akshay Somkuwar"
// Host name (must match the name on the account) and email
recipientDatum.recipientName = "Akshay Somkuwar"
recipientDatum.recipientEmail = "akshay.s.somkuwar#gmail.com"
let recipientData: Array = [recipientDatum]
Same recipient is added for template in docusign website
Also i have added observers for DSMSigningCompleted and DSMSigningCancelled to get envelopeId.
Now when i am calling this function displayTemplateForSignature no screen is opening to show the PDF or To sign the PDF, without asking for signature, the envelope is directly sent to the recipient. and i am getting this response in console with notification.
name = DSMSigningCompletedNotification, object = Optional(<Public_Adjuster.AgreementSignViewController: 0x110bb8060>), userInfo = Optional([AnyHashable("templateId"): 506346f5-7adb-4132-b15f-d288aa268398, AnyHashable("signingMode"): online, AnyHashable("envelopeId"): 2eeeeda8-5b74-4930-904e-94b2ce6451ac])
I want to open the pdf for the passed templateId but its not opening the pdf nor its asking for signature, and its directly sent to the recipient.
Any help will be appreciated, Thank you.
This behaviour, sending the envelope directly, is triggered when DocuSign SDK can not find any signers in the template/envelope that matches the logged-in user. Given that you are using the recipientDefaults, ensure that your signer information on the template (preset signer on the DocuSign web) matches the Account information exactly with the recipientDefaults object.
You may compare it with .
One issue I noticed is the signer type is set to need to sign which corresponds to a remoteSigner on the DocuSign web. And on the recipientDefaults object it's set as inPersonSigner. It should be .signer corresponding to DSMRecipientTypeSigner.
recipientDatum.recipientType = .signer.
Or you may change the need to sign to in person signer on the DocuSign web.
Another suggestion is to remove the name & email from the template screenshot shared and keep that empty as the client app is passing name & email with the recipientDefaults object to the SDK.
More details: How to set recipient defaults
I'd failed to update the managed device category in Intune with Microsoft Graph. With the same code, I'd succeeded to update device owner. Parameter below:
URL: https://graph.microsoft.com/beta/deviceManagement/managedDevices('XXXXXXXXXX')
Failed request body:
{ "deviceCategoryDisplayName": "General Purpose" }
Succeeded request body:
{ "Owner": "Personal" }
"General Purpose" is a custom value. When failed, the server returns an error code and activity id.
How can I fix it?
I've got the answer finally.
We should use odata.id to update the property. Like these,
URL: https://graph.microsoft.com/beta/deviceManagement/managedDevices('XXXXX-YOUR-INTUNE-DEVICE-GUID-XXXXX')
Method: PUT
Payload: {#odata.id: "https://graph.microsoft.com/beta/deviceManagement/deviceCategories/XXXXX-YOUR-DEVICE-CATEGROY-GUID-XXXX"}
Response code: 204
You will receive response code 204 when success to update. And, you cannot update other properties with it. It occurs error.
In the API documentation, it can update with string, but it is not correct. Maybe, it is not string property but refers to other objects. I think other objects referring property are the same, but not tested.
https://techcommunity.microsoft.com/t5/Microsoft-Intune/Update-Intune-Managed-Device-Category-with-Microsoft-Graph-were/m-p/366263/highlight/true#M1683
We have a callback url in place that is correctly capturing the failed status of a call.
Our code then fetches from twilio the details of the call by doing the following:
$call = $twilio_client->calls($sid)->fetch();
Within the call details returned there is no 5 digit error code listed, even though the failed status is present.
How do we get the 5 digit error code that caused the failure?
Twilio developer evangelist here.
Thanks to #miknik for the answer, however that is actually a deprecated resource (which is why you can't currently find any documentation on the matter). It's taken me a while to find the answer as I've been chasing down where the notifications have gone.
The Notifications API was deprecated in favour of the Monitor Alerts API. This API can give you all the details about an alert, including the 5 digit code.
The best way to receive these alerts for your application is to set up a webhook in your account console which will send all the parameters about the alert as part of the request.
You can also list your alerts which will allow you to find alerts from a specific resource SID (in your case, a call SID).
Let me know if this helps at all.
Make an authenticated GET request to
/2010-04-01/Accounts/{AccountNumber}/Calls/{CallSid}/Notifications
So in PHP the following will retrieve the notification info for your call
$json = file_get_contents('https://{AccountNumber}:{AuthToken}#api.twilio.com/2010-04-01/Accounts/{AccountNumber}/Calls/{CallSid}/Notifications.json');
Then use this line to get the returned JSON into an associative array
$obj = json_decode($json, true);
Now if all you want is the error code its stored as the following variable
echo $obj[notifications][0][error_code];
However, the full error info is also returned as a URL encoded string. You can access this by first urldecoding it, and then parsing the query string into an array with the following line
parse_str(urldecode($obj[notifications][0][message_text]), $output);
And you can now access the variables within like this
echo $output[Msg]; // Error text for failure eg invalid phone number
echo $output[phonenumber]; // Phone number for failed call
echo $output[ErrorCode]; // 5 digit error code
echo $output[LogLevel];` // Log level of error eg WARN
As far as I know this is not implemented in the PHP helper library, so you have to code for it manually
I get this error message when trying to submit a new version of my app for review:
While I've seen other threads about this error message, the solutions presented haven't worked for me and I haven't seen any mentions of the actual server error message I get. iTunes Connect responds with the following error message:
Error converting JSON string to object: Can not instantiate value of type [simple type, class com.apple.jingle.label.content.purple.to.LCSubmitForReviewTO] from JSON integral number; no single-int-arg constructor/factory method
Request details:
Remote Address:23.1.186.88:443
Request URL:https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/apps/123456789/version/submit/complete
Request Method:POST
Status Code:500 Internal Server Error
Full JSON response:
{
"data":null,
"messages": {
"warn":null,
"error":[
"Error converting JSON string to object: Can not instantiate value of type [simple type, class com.apple.jingle.label.content.purple.to.LCSubmitForReviewTO] from JSON integral number; no single-int-arg constructor/factory method"
],
"info":null
},
"statusCode":"ERROR"
}
I've tried clearing all cookies, and also changing to another browser, and I've also tried removing the build and adding it again, but I get the same issue regardless. Has anyone else had this exact problem? Did anyone find a way around it?
I just tried submitting my app again, after 12 hours of being unable to. It worked!
In order to understand how the Push service in BlackBerry is implemented, I have installed the Push Service SDK and following the Push_Service_SDK-Getting_Started_Guide. Following ths steps thoroughly, on "Registering" myself from the app, I got the following error:
Request to register failed. Caused by java.io.IOException: Network operation [Subscribe] failed. Make sure that Content Provider URL is accesible.
Can anyone guide me through this. When keying in the details, we need to provide the "BPS server URL" and "Push Initiator application URL". I have received the credential details from BlackBerry and it contains PPG Base Url as "cpXXX.pushapi.eval.blackberry.com" where the XX needs to be replaced by the CPID (Content Provider ID). Is this link to be keyed in for "BPS server URL" and "Push Initiator application URL"? I did key in this and received the above error on "Register".
Please guide.
You should have received a mail with your credentials for both server app and blackberry client app. For the client app, they should look like this:
Application ID: <CPID(4 chars)>-<id(35 chars)>
PPG Base URL: http://cpXXX.pushapi.eval.blackberry.com
Push Port: <port(5 chars)>
As you can see, the App id has two parts. The prefix before the dash is your CPID, and the rest is the id. Then we have an URL where we will need to replace the XXX with the CPID (note that the CPID usually is a 4 digit number, so it would have been better if they had used XXXX as placeholder). Finally the port number which has up to 5 digits.
With those params, in your BB app, you would code something like this:
String id = "<your full app id here>";
String url = "http://cp<CPID>.pushapi.eval.blackberry.com"; //Make sure it is http and not https, and check you have replaced <CPID> with the appid prefix.
int port = <port>;
byte serverType = <PushApplicationDescriptor.SERVER_TYPE_BPAS or
PushApplicationDescriptor.SERVER_TYPE_NONE>;
ApplicationDescriptor descriptor = ApplicationDescriptor.currentApplicationDescriptor();
PushApplicationDescriptor pushDescriptor = new PushApplicationDescriptor(id, port, url, serverType, descriptor);
// This is how we would register the client app:
PushApplicationRegistry.registerApplication(pushDescriptor);
After executing that line, if everything is ok (registration needs some time, a few connections are made), you can check the registration status calling PushApplicationRegistry.getStatus or via the onStatusChange callback.