x

{ "message": "Not Authorized", "type": "service.not_authorized" } error recieved while oauth

{
"message": "Not Authorized",
"type": "service.not_authorized"
}

I am receiving this error constantly while processing OAuth, it was working a day before but don't know why suddenly it's not working .

1,579 Views
Message 1 of 4
Report
3 REPLIES 3
Admin

Hey! Thanks for reaching out! “Not Authorized” when using OAuth typically means the OAuth secret or the application id (client id) is incorrect. Please ensure that the secret and client id are correct for whatever environment you're using (production or sandbox). Also be sure that if you're using sandbox, the URL domain is …squareupsandbox… and not …squareup….

 

Let me know if you have any other questions. 🙂

AshleyK
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
1,523 Views
Message 2 of 4
Report

I am using the application id for OAuth (authorizing application), have taken the app id correctly every time. But I get the same error every time. For OAuth, i am only using app id not app secret. Can you please suggest further? I  am using sandbox also sandbox URL

1,520 Views
Message 3 of 4
Report
Admin

If you're using ObtainToken endpoint, one of the requirements is client_secret (which is also the application secret). When exactly are you seeing this error just in case I am misunderstanding? Also, the doc for ObtainToken is here.

AshleyK
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
1,494 Views
Message 4 of 4
Report