Events REST Api

  • 0
  • 1
  • Question
  • Updated 12 months ago
  • Answered
  • (Edited)
I'm trying to invoke a workflow via a REST request to the Events API. I'm sending my payload to https://events.e2ma.net/v1/ per the example response in the docs (fyi if this is the correct url for the event api, it is *not*clearly indicated -- I found this after getting 404s on the normal endpoint/acct#/events). I'm attempting to use the same basic authentication header that works for the other emma api, but I'm getting the following result:

 {"message":"Authorization header requires 'Credential' parameter. Authorization header requires 'Signature' parameter. Authorization header requires 'SignedHeaders' parameter. Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header. Authorization=Basic {my header}="}
This looks like a standard aws authentication error. What am I doing wrong?
Photo of Talent Response

Talent Response

  • 4 Posts
  • 1 Reply Like

Posted 2 years ago

  • 0
  • 1
Photo of Kyle Gregory | Lipscomb University

Kyle Gregory | Lipscomb University, Champion

  • 99 Posts
  • 69 Reply Likes
Hey @Talent Response,

Yeah, looks like there are some headers AWS is requesting that are not there. https://api.e2ma.net doesn't respond to "event" commands, so I think you have the URL correct of https://events.e2ma.net/v1/. Not much is clear about the new API; and lack of documentation is not uncommon here. You might want to reach out to support or your contact on Emma's team and see if they have more. Looks like the API is only for Emma Plus and some other Enterprise customers, so more information is needed from Emma to access the endpoint.

Sorry I can't help further.
Kyle
Photo of Talent Response

Talent Response

  • 4 Posts
  • 1 Reply Like
Thanks for the help Kyle! We are currently in a demo of the premium level so we *should* have access. I'll reach out to our support contacts.
Photo of Cody De Vos

Cody De Vos, Official Rep

  • 106 Posts
  • 39 Reply Likes
Hi there! My name is Cody, and I work with our engineers on the Product team. I ran your question by the engineer who built this endpoint, and he suggested that you check 2 things: 

1. Confirm that you're posting to the URL https://events.e2ma.net/v1/<account_num>/events/ (obviously including your own account number there)
2. Confirm that you're making your request as a POST

Let me know if you continue to have trouble here!
Photo of Talent Response

Talent Response

  • 4 Posts
  • 1 Reply Like
Hi Cody,

Yep, I'm doing both of those things. I'm using retrofit. I've confirmed it's a post and I'm posting to https://events.e2ma.net/v1/{accountId}/events.

Thanks,
Chris
Photo of Kyle Floyd

Kyle Floyd, Official Rep

  • 178 Posts
  • 26 Reply Likes
Hi Chris,

I wanted to check in here and see if you had made in progress on this call. I'm guessing that you haven't and that there is some more assistance needed from my team here. I am going to have one of my team members reach out to you directly through email so that we can obtain the full call that you are making and run some more specific test on that call internally.

I'm sorry for the delay here but you can definitely expect to hear from us very soon.
Photo of Talent Response

Talent Response

  • 4 Posts
  • 1 Reply Like
Hi Kyle -

Still waiting for guidance on this. Chris Thompson is our tech lead, and would be best to work with. He's been on several threads with Alex Phillips from Emma, so please reach out to him for his contact info. We'd ideally like this addressed asap.

Chris
Photo of Kyle Floyd

Kyle Floyd, Official Rep

  • 178 Posts
  • 26 Reply Likes
Hi Chris,

Thanks for following up here. I see that yesterday morning we did receive some additional information from Chris Thompson through email. We are reviewing that information and will follow up with him as soon as possible with next steps.
Photo of Greg Rathbun

Greg Rathbun, Customer Service Specialist

  • 296 Posts
  • 22 Reply Likes
Hi Chris,

I also emailed this to Chris Thompson, but I wanted to share it with you too...

Thanks for the info, I had our API experts dig in and this is what they found (in their words): 

"Looking through the http logs and the error message they sent over earlier, the Authorization error they're getting is coming from the other service that they're using and not Emma. So they would need to make sure that the authorization they're using for the other service is valid." 

If you have any questions, let us know and we'll be glad to help.
Photo of ADS Security

ADS Security

  • 4 Posts
  • 0 Reply Likes
I had the same issue, but figured it out.

Had to include the HttpRequestHeader.Authorization.
Created it like this:

string credentials = "Basic " + Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes(PublicKey + ":" + SecretKey)); 
httpWebRequest.Headers.Add(HttpRequestHeader.Authorization, credentials);

where PublicKey and SecretKey are my Emma API keys.
Photo of Jimmy@RedCaffeine

Jimmy@RedCaffeine

  • 1 Post
  • 0 Reply Likes
I went thru this process and had to mash up an authentication header (did this thru Postsman) using public and private key. 

I almost feel like though now I have it working it was a lucky chance.

I feel strongly that the Events API needs better/more complete and explicit documentation. The API wrappers for Node and .NET seem a little outdated, so having really clear direction on the proper authentication is a pretty key item to get right. REST is not exactly rocket science so it should be the baseline.