Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Get an access token for SDM API error

729 views
Skip to first unread message

Yuntong Guo

unread,
Nov 2, 2023, 12:58:40 AM11/2/23
to RunMyProcess Developer Forum
I'm following the documentation and trying to get the access token by this command:
curl -L -X POST 'https://www.googleapis.com/oauth2/v4/token?client_id=oauth2-client-id&client_secret=oauth2-client-secret&code=authorization-code&grant_type=authorization_code&redirect_uri=https://www.google.com'
However, I received the error message"411. That’s an error.
POST requests require a Content-length header. That’s all we know."
Can anyone help me fix it?

Tomas Kolacek

unread,
Nov 6, 2023, 4:17:05 AM11/6/23
to RunMyProcess Developer Forum, Yuntong Guo
Hello,
 
Could you please try to use -d "" option, which causes CURL to send Content-Length: 0 ? So the final command would look like this:
 
curl -L -X POST "https://www.googleapis.com/oauth2/v4/token?code=authorization-code&client_id=oauth2-client-id&client_secret=oauth2-client-secret&grant_type=authorization_code&redirect_uri=https://www.google.com" -d ""
 
Please let me know, if this helps.

Thank you and Best Regards
Tomáš Koláček
-----------------------------------------
Tomáš Koláček
Akorbi Digital RMP
Customer Support
-----------------------------------------
Reply all
Reply to author
Forward
0 new messages