Hi everyone,
I’m trying to integrate the X Ads API in my Bubble.io app and have been following the OAuth 1.0a authentication flow. However, I’m stuck at Step 3: POST /oauth/access_token, where I keep getting the error:
Error processing your OAuth request: Invalid oauth_verifier parameter
What I’ve Done So Far:
Requested a Request Token (
oauth_token
) from /oauth/request_token
– Successfully received
oauth_token
and oauth_token_secret
.
Redirected the user to
/oauth/authorize
– User sees the login screen and grants access.
Received
oauth_verifier
in the callback URL – The callback contains
oauth_token=XYZ123&oauth_verifier=ABC456
.
Exchanging for Access Token (
oauth/access_token
) – Error: “Invalid oauth_verifier parameter”.
How I’m Sending the Request in Postman:
- POST request to:
https://api.twitter.com/oauth/access_token?oauth_token=XYZ123&oauth_verifier=ABC456
- Authorization (OAuth 1.0) in Postman:
- Consumer Key
- Consumer Secret
- Access Token
(Same
oauth_token
from Step 1) - Token Secret
(Same
oauth_token_secret
from Step 1) - Signature Method: HMAC-SHA1
- “Add params to header”
- Consumer Key
What I Have Tried:
Regenerating a fresh
oauth_token
and oauth_verifier
– Still getting the same issue.
Checking if
oauth_verifier
is in the request body – It’s being sent in the query parameters as per X API documentation.
Ensuring the
oauth_token
used in this step is the same one from /oauth/request_token
– Double-checked.
Confirming the
oauth_token
hasn’t expired – Immediately used after generation.
Questions:
Why am I getting “Invalid oauth_verifier parameter”, even when using the correct
oauth_verifier
from the callback?
Should the request be sent with query parameters or the request body?
Is there something missing in how I’m signing the request?
Any help would be greatly appreciated!