Question

Call REST API from event action with Bearer Authentication

  • 21 June 2021
  • 0 replies
  • 56 views

Badge

I’m trying to set up an event action to call a REST end point that is secured with an API key.  The event action works correctly when I have the Authentication method set to none, but when I secure my end point and change the Authentication method to Bearer the application message fails.  I’ve tried entering an API key of ”abc123”, when I do that the application fails with this message:

Failure while obtaining result: java.lang.ArrayIndexOutOfBoundsException: 2 

Caused by: commonj.work.WorkException: java.lang.ArrayIndexOutOfBoundsException: 2 

Caused by: java.lang.ArrayIndexOutOfBoundsException: 2

 

When I try with an API key of “Bearer abc123” it fails with this message:

Failure while obtaining result: java.lang.StringIndexOutOfBoundsException: String index out of range: -6 

Caused by: commonj.work.WorkException: java.lang.StringIndexOutOfBoundsException: String index out of range: -6 

Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -6

 

So I think there is something I’m missing in the API key but I have no idea what it is, has anyone been able to set this up successfully?

 

 


0 replies

Be the first to reply!

Reply