- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2023 11:46 PM - edited 06-05-2023 11:51 PM
Hello
I am trying to use API key based authentication to push events in MidServer. Basic authentication works fine. But when I try to change it to API key based i get the following error in postman output.
What is the Key Prefix ? As per documentation it is Authorization: Key <API Key> . My API Key Name is XXXX_API_Key_SandBox. So shouldn't it be Authorization: XXXX_API_Key_SandBox blahblahblahAPIkey
{
"servlet":"org.glassfish.jersey.servlet.ServletContainer-738862b5",
"message":"invalid key prefix in Authorization header (prefix should be 'Key' followed by a whitespace and the API Key)",
"url":"/api/mid/em/inbound_event",
"status":"401"
}
Not sure what I am doing wrong in the payload
Some screenshots
From Postman header
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 12:10 AM
Hi @Anirban5 ,
The Authorization header value should be Apikey b8ee.... or Key b8ee....
If my answer has helped with your question, please mark it as correct and helpful
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 12:10 AM
Hi @Anirban5 ,
The Authorization header value should be Apikey b8ee.... or Key b8ee....
If my answer has helped with your question, please mark it as correct and helpful
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2024 07:17 AM
@Karan Chhabra6 @Anirban5 For some reason my API key contains wired charter like . Any idea what might be the issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2024 08:19 PM
That usually means the record has been imported as XML from another instance, as the APIKey field is an encrypted 'password2' field and doesn't transfer between instances without getting garbled.