Best answer

Webhook POST action returning Error: Access Key, User ID and Request Type Required

  • 11 June 2021
  • 3 replies
  • 180 views

Userlevel 1

So I have a catch hook from a partner site that is triggering an action / webhook by Zapier request to our site(WordPress). This webhook(Custom Request POST) is sending a raw json payload that consists of a few simple items for a REST API that is part of WordPress plugin(myCred).

It’s making the initial handshake but I am getting an error in response:

Error: Access Key, User ID and Request Type Required

All of which are in the payload and verified by testing on requestbin. I am not sure if there is possibly a format issue or something I am missing but the json is formatted accordingly to the documentation of the plugin.

Here is my payload with the obvious redacted info:

 

This seems terribly simple but I’m definitely missing something.

 

Thanks for any eyes on this. I appreciate it.

 

EDIT: Thought I would add their endpoint documentation for reference.
 

 

icon

Best answer by escobeezee 21 June 2021, 22:35

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +12

Not sure if this is because you were redacting info but wanted to point out that in your screenshot you are missing the v1 between mycred & points https://site.com/wp-json/mycred/v1/points 

It also might be that those are not supported in the body of the request but instead need to be passed in the url as parameters meaning your url would need to append each variable 

https://site.com/wp-json/mycred/v1/points?access_link=…..&user_id=…..&type=add

Userlevel 1

Hey @GetUWired  thanks so much for the response.

The settings for the API usage let you change the API URI and I just dropped the V1 for simplicity. I have tried via Insomnia and Postman API APP testing the string query and I am getting nothing with that. I also tried with the V1 just for shits and giggle and when I do add it I get a REST routing error.

 

I have made sure I linted my JSON just in case it was a goof there. I am at a total loss as to what could be causing the issue when it hits the server. It just seems no matter how I send the info over it just doesn’t see it. I know it’s getting there intact because it gets a 200 response but no matter what I try it’s still failing to see the data. Also their documentation says that even on failure responses you get a 200. :(

I have tickets open with myCred but they are unresponsive as of last week. Yay for support after paying for a decent lisence.

 

Thanks for taking a look, I really do appreciate it.

 

c.

Userlevel 1

For anyone who might stumble onto this issue specifically with MyCred, the issue was with how the API payload is sent. It is meant to be sent as form data and once that was rectified it was a piece of cake.

 

c.