How do I register a Go To Webinar attendee to a specific session using their API V2? - reactjs

OK so...through a custom form, I am successfully registering attendees to Go To Webinar but am blocked if there are multiple sessions of the same webinar. Currently, I am returning scheduled sessions to populate our dropdown menu (response shown below) but am challenged with passing back sessionKey with the registration payload. Has anyone successfully done this? Help! I've also put in an inquiry with GTW so will let folks know what I hear if others are struggling with this also. Thanks!
[{
webinarKey: xxxxxxxxxxxxxxxxx,
registrantsAttended: 0,
webinarID: "xxxxxxx",
sessionKey: 666666,
startTime: "2020-05-06T19:27:54Z",
endTime: "2020-05-06T20:01:13Z"
},
{
webinarKey: xxxxxxxxxxxxxxxxx,
registrantsAttended: 0,
webinarID: "xxxxxxx",
sessionKey: 777777,
startTime: "2020-05-07T19:26:08Z",
endTime: "2020-05-07T19:26:43Z"
}]

Populate a list for the webpage visitor using Scheduled
webinars
An interested individual selects a webinar from the list
and you submit their details using Create registrant
For step 2 you should also know the following:
To use the second version of the api you must pass the header value
'Accept: application/vnd.citrix.g2wapi-v1.1+json'
instead of 'Accept: application/json'.
Leaving this header out results in the first version of the API call.

Related

Customization of devloper portal to put api published time in overview of devprortal

This time should be shown in the developer portal overview.
Can it be done? if yes how?
There are some libraries you could use for example: moment js or date-fns
https://momentjs.com/docs/#/displaying/fromnow/
moment([2007, 0, 29]).fromNow(); // 4 years ago
https://date-fns.org/
formatDistance(subDays(new Date(), 3), new Date(), { addSuffix: true })// "3 days ago"
You'll have to do a UI customization to achieve this. createdTime and lastUpdatedTime are returned in the Publisher REST API response when getting an API. You have to check whether those are returned in the Devportal REST API response for getting an API. If those values are returned, you can use them directly to do the customization. Otherwise, it will not be possible.

Microsoft Graph API - Get directory objects from a list of ids - Bad request

I need to get a list of groups that the user is a member of using Microsoft Graph API.
For this, I am using the endpoint POST /users/<userId>/getMemberGroups (doc). This works fine but the problem is that the response is only a list of group object ids. I need to get group properties too. I could just loop through the list and query API for GET /groups/<groupId> but this takes too long when the user has multiple groups.
Then I found POST /directoryObjects/getById (doc) which turns that list into what I need. I have followed the doc page exactly but I am getting the following error:
Request_BadRequest - Specified HTTP method is not allowed for the request target. (HTTP status 405)
What am I doing wrong? Is the method getById bugged? If it is, is there any alternative way to turn a list of group object ids into groups or to get full list of user groups?
The API Get directory objects from a list of ids you mentioned should work, I test it in the MS Graph Explorer, it works fine.
Make sure you use POST method, I can reproduce your issue with another method.
You could refer to the informations below and try again.
Request URL:
POST https://graph.microsoft.com/beta/directoryObjects/getByIds
Request Body:
{
"ids": [
"xxxxxxxx-9f1b-4f28-a408-xxxxxxxxxxxx",
"xxxxxxxx-a614-4335-81eb-xxxxxxxxxxxx",
"xxxxxxxx-e500-49d6-a705-xxxxxxxxxxxx",
"xxxxxxxx-5be3-41eb-864d-xxxxxxxxxxxx",
"xxxxxxxx-961d-4db9-87cf-xxxxxxxxxxxx",
"xxxxxxxx-93bf-4950-8d96-xxxxxxxxxxxx"
],
"types": [
"group"
]
}
Result:

How to Develop alexa to speak latest response again

In Details:
Example:
user:- asks About Cricket News.
Alexa:- Reads about the new.
If users says come again or replay
user: Come again.
Alexa: Must read it again what it spoke earlier.
How to handle this situation using webhooks.
Thanks in advance.
You can make use of sessionAttributes to keep track of the last response that Alexa spoke. Whenever you return a response just store the speech and re-prompt in sessionAttributes and whenever a ComeAgainIntent is triggered, take the value from the sessionAttributes and respond accordingly.
Ex:
...
"sessionAttributes": {
"lastResponse": {
"speech": "This was my last speech",
"reprompt": "This was my lst reprompt"
}
}
...
Every time before building the response store the response as lastSpeech in session attributes and write a comeAgainIntent or use amazon.REPEAT intent to repeat the response by getting lastSpeech from session attributes.

Meteor sendVerificationEmail

I'm currently working on revising the registration procedure of our recruitment ATS, made with AngularJS and Meteor, and I need to verify the new user's email during the registration procedure.
The logic would go as followed:
1- User fills in a form on the 'get-started' page and when clicking on 'sumbit', the ATS sends a verification email(I'll be using 'sendVerificationEmail' from Meteor)
2- After the user clicks on the link from the email, they'll get redirected to the 'register' page where additional information is required and the registration procedure is concluded.
As mentioned above, I'm planning to use 'sendVerificationEmail' to verify the user but I also want to use it to send back the userID.
From what I read on the Meteor API, I can pass extra data to the token with 'extraTokenData'
Accounts.sendVerificationEmail(userId, [email], [extraTokenData])
Now how do I declare the 'extraTokenData' object?
Could I do it like this: Accounts.sendVerificationEmail(userId, "", { _id: userId })
And how do I retrieve the 'userId' with 'Accounts.onEmailVerificationLink'?
your help will be greatly appreciated.
The email and the extra tokens are optionals, but if you want to send them send it as a string.
If you want to send the extra token but no emails you can try using Accounts.sendVerificationEmail(userId, undefined, "extra token") or if it doesn't work you can request the user's deatil user Meteor.user(). then call user.emails[0].address.
To retrieve information you have to get user by token and all data are there on user document under services.password.reset field. Look here how Accounts.generateResetToken is implemented https://github.com/meteor/meteor/blob/1e7e56eec8414093cd0c1c70750b894069fc972a/packages/accounts-password/password_server.js#L609.

How to send multiple documents for signature DocuSign for Salesforce

Please can someone assist me. I am new to DocuSign. I have a project I am working on whereby the customer wants to be able to send multiple documents to a recipient for signature. From the standard DocuSign set up, you can add documents upon envelope creation but I am looking for a way to automate this. For instance I created a custom button that automatically sends the envelope to a recepient. But it seems I can only add one document template there. Could someone please advise me on what to actually do or where to look because I cant seem to find anything. I see some recipies on the DocuSign help but they are in python etc and I want instruction on Salesforce.
POST
https://demo.docusign.net/restapi/v2/accounts/[accountId]/envelopes
In your create envelope body, you can specify multiple documents like:
emailSubject: "subject",
recipients: {
signers: [{
recipientId: 1,
email: "signer#email.com",
name: "Signers name"
}]},
documents: [{
documentId: 1,
filePath: 'your/path/here/1',
},
{
documentId: 2,
filePath: 'your/path/here/2',
}],

Resources