How to Integrate With The MeasureSquare Cloud API
In this article, you will learn how to correctly send your API requests to the MeasureSquare Cloud API.
This article applies to MeasureSquare Cloud.
Measure Square requires multiple parameters from third-party solution providers who wish to integrate with Measure Square's Cloud API. In addition a standard API key, the solution provider will need a secret key and will be required to provide three new parameters in every request.
Locate your API Key
If you already have an API key, you may locate it by accessing your MeasureSquare Cloud account and navigating to
Group Management > Group Setting > API Key. If you do not already have an API key, please contact the Measure Square Support team at
support@measuresquare.com or over the phone at (626) 683-9188.
Use HTTP Basic Authentication protocol by doing the following:
- Base64-encode your API key
- Add the encoded API key to your HTTP request header named "Authorization": "Basic [your Base64-encoded API key here]"
Receive your X-Application & Secret Key
The three required parameters are listed below, along with descriptions. Please be aware that they should be provided in your HTTP request header.
- X-Application: String associated with your application
- X-Timestamp: Current Unix timestamp
- X-Signature: Unique signature generated by using both the secret key and timestamp string to generate a HMAC-SHA256 signature. This must be base 64-encoded.
Note: As best practice, the timestamp should always be current, because the Cloud API will reject requests with a timestamp older than five minutes.
Example
Below is an example of an API request containing the required X-headers written in C#:
- var client = new HttpClient();
- var request = new HttpRequestMessage(HttpMethod.Get, "https://cloud.measuresquare.com/api/projects/06113fe339134a068971329d11f943g28"); // Call Get Project API endpoint
- request.Headers.Add("X-Application", "SampleApplication");
- request.Headers.Add("X-Timestamp", "1751916708");
- request.Headers.Add("X-Signature", "GQe5g/P2KsAhDGLMM7FfyOCPzO1uaWBYfpGJcWyeWP8=");
- request.Headers.Add("Authorization", "Basic ZALjY3IyNzbxNeE0NDcwQmI1MzY2MGNPrTIxNmU7QXm=");
- var response = await client.SendAsync(request);
- response.EnsureSuccessStatusCode();
- Console.WriteLine(await response.Content.ReadAsStringAsync());
Related Articles
The MeasureSquare Cloud API Integration Reference
In this article, you will learn the basics of integrating with MeasureSquare's Cloud API, as well as various integration workflows. MeasureSquare's Cloud API allows third-party applications to leverage MeasureSquare's project data, such as diagrams, ...
How do I integrate my third-party solution with MeasureSquare?
This article is for any client who wishes to integrate or otherwise create an automated progress to transfer Measure Square project data into third-party systems such as Salesforce or Microsoft Dynamics 365. The MeasureSquare Cloud API has a variety ...
How do I access my API key?
This article applies to the MeasureSquare Cloud. This article will show you how to access your API Key via the Cloud at cloud.measuresquare.com. If you do not already have a group set up in Measure Square Cloud, then to begin you must contact Measure ...
Commonly Used API Endpoints in MeasureSquare
In this article, you will learn how which endpoints are commonly used and what they are used for When integrating Measure Square's Cloud API with your third-party system, you may be wondering where to start. To give you an idea of which endpoints you ...
Stripe Integration with MeasureSquare CRM
In this article, we will cover an how to integrate with Stripe and how it's used in MeasureSquare CRM This article applies to MeasureSquare CRM version 1.38 and above. If you use Stripe to receive payments, and want to give customers an easy way to ...