oAuth parameter omitted in help section

Just a heads-up, guys: in oAuth help section here there’s an example header with the complete list of parameters to be sent to obtain oAuth access token.



Turns out, there’s one parameter missing there and without it you will always get the ‘parameter_absent’ error. The missing parameter is the oauth_token which is the request token obtained in previous steps.



Took me almost one complete day to find it out the hard way, so just in case somebody is (like myself) developing an alternative oAuth class for Mautic, be aware: the complete header should look like this:

Code:
POST /oauth/v1/access_token Authorization: OAuth oauth_callback="https%3A%2F%2Fyour-callback-uri.com", oauth_consumer_key="CONSUMER_KEY", oauth_nonce="UNIQUE_STRING", oauth_signature="GENERATED_REQUEST_SIGNATURE", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1318467427", oauth_token="REQUEST_TOKEN", oauth_verifier="OAUTH_VERIFIER_FROM_STEP_TWO" oauth_version="1.0"

(Note the oauth_token parameter before oauth_verifier)
Cheers :)

Just a heads-up, guys: in oAuth help section here there’s an example header with the complete list of parameters to be sent to obtain oAuth access token.

Turns out, there’s one parameter missing there and without it you will always get the ‘parameter_absent’ error. The missing parameter is the oauth_token which is the request token obtained in previous steps.

Took me almost one complete day to find it out the hard way, so just in case somebody is (like myself) developing an alternative oAuth class for Mautic, be aware: the complete header should look like this:

POST /oauth/v1/access_token Authorization: OAuth oauth_callback="https%3A%2F%2Fyour-callback-uri.com", oauth_consumer_key="CONSUMER_KEY", oauth_nonce="UNIQUE_STRING", oauth_signature="GENERATED_REQUEST_SIGNATURE", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1318467427", oauth_token="REQUEST_TOKEN", oauth_verifier="OAUTH_VERIFIER_FROM_STEP_TWO" oauth_version="1.0"

(Note the oauth_token parameter before oauth_verifier)
Cheers :slight_smile: