Skip to content

Magento api keeps responding with oauth_problem error

I am trying to get an acces token from magento by using OAuth1. when i send the array bellow i get this error

oauth_problem=%22oauth_consumer_key%22+is+required.+Enter+and+try+again%2C+%22oauth_signature%22+is+required.+Enter+and+try+again%2C+%22oauth_signature_method%22+is+required.+Enter+and+try+again%2C+%22oauth_nonce%22+is+required.+Enter+and+try+again%2C+%22oauth_timestamp%22+is+required.+Enter+and+try+again

I am pretty new to the magento api and cant figure out what is wrong with my request. below is a vardump of the data getting send. if you see the problem please let me know.

array(5) { ["Authorization"]=> string(317) "OAuth oauth_consumer_key="hqq7epm3vew3jflzd78aqhg48p9mki3k", oauth_callback="http%3A%2F%2F4151-83-98-230-219.ngrok.io%2Fmagento.php", oauth_nonce="WjEzGaS3egCnoZ6SLMUQ8fL5ljmf9qVw", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1667217588", oauth_version="1.0", oauth_signature="lZvRLjl06Ta2yLWeMB2w5FO2jQQ%3D"" ["Content-type"]=> string(47) "Content-type: application/x-www-form-urlencoded" ["Host"]=> string(27) "Host:THIS IS NORMALLY FILLED" ["Connection"]=> string(17) "Connection: close" ["Content-length"]=> string(17) "Content-length: 0" }