Missing required parameter 'client_id'

Can someone help we with this error I passed client_id but I got this message

What endpoint are you calling when you get this error? :slightly_smiling_face:

obtainToken // oauth2/token

for sandbox it works all right, but for production I got an error

What was the error message you got in production? :slightly_smiling_face:

this is my error message ‘Missing required parameter ‘client_id’ but I am not using square in production yet its just my local app:)

Okay, what’s the body of the request you’re making look like? Also please be sure to redact any access token. All the other fields are okay to share. Lastly when making this request what’s the base path URL. Is it the production connect.squareup.com or sandbox connect.squareupsandbox.com ? :slightly_smiling_face:

the body is {
code: ‘my_authorization_code’,
grant_type: ‘authorization_code’
base URL is connect.squareup.com
all fields are okay and with the same fields and values I could get access token but with sandbox(

what do we understand by saying redact access token?

Okay, that all looks correct. What is the clientId that you setting?

As for access tokens, the endpoint that you’re calling does accept an access token for certain types of calls. Just wanted to make sure that you didn’t provide one since they are secret. :slightly_smiling_face:

the clientId is the application id which square gave me in my square acc

Right, what is it so I can check the request in our logs? :slightly_smiling_face:

yes please it’ll be greate

Could you post the clientId you’re using so I can take a look? :slightly_smiling_face:


I’m not seeing any reason that this shouldn’t work unless the client_id isn’t correctly set in the request. Would you mind sharing the snippet of code that your using to build the request so we can try and replicate? :slightly_smiling_face:

but mustnt I pass field clientId instead of clinet_id
because obtainToken method requires clientId field not client_id

ok Bryan thanks a lot I have already fixed it)) just hadn’t given right environment :man_facepalming: