This is an example question to guide you as you start asking questions!
Make sure your title and description are descriptive and include what you are trying to achieve and what you’ve already tried.
Make sure you provide what SDK or API you’re using along with the version number.
Make sure you include environment-specific information such as OS / Language Runtime / etc.
Make sure you are not asking a duplicate question. Repeat questions water down information across multiple posts and create additional work for the community. Always check to see if your questions have been asked previously.
The 401 unauthorized error is typically due to an invalid (or possibly even missing) access token made in your API request. Please be sure that your request includes a valid access token in the Authorization header. Please also note that if you’re using sandbox, that the domain should be “https://connect.squareupsandbox.com” instead of “https://connect.squareup.com”, which can also cause this error. For more information about setting this header, take a look at our doc site.
@hussainmd I took a look at your account and see successful API calls. Are you still running into this error? Also I see that you are calling the deprecated Transactions API. Is there a reason that you are using that API?