Skip to content

Instantly share code, notes, and snippets.

View IntuitDeveloperRelations's full-sized avatar

Intuit Partner Platform IntuitDeveloperRelations

View GitHub Profile
{
"/accounting/AccountingTransactionLine" : {
"type" : "object",
"allOf" : [ {
"$ref" : "/Entity"
}, {
"type" : "object",
"properties" : {
"description" : {
"type" : "string",
@IntuitDeveloperRelations
IntuitDeveloperRelations / intuit-v4-workspace-payroll-prod.md
Last active November 16, 2018 16:42
Intuit V4 Payroll - Insomnia Setup

GraphQL Client Setup - Insomnia

We will be using a GraphQL client named Insomnia to execute API calls against Intuit's V4 APIs. We chose Insomnia for its features such as GraphQL introspection, typeahead support for queries and mutations, and OAuth2 handshake support.

  1. Download and install the Insomnia client for your operating system

  2. Launch Insomnia

  3. Import the Insomnia workspace for Intuit's V4 pre-production environment

  • Open the Insomnia menu
protected void CreateAuthorization()
{
//Remember these for later.
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls11;
HttpContext.Current.Session["consumerKey"] = consumerKey;
HttpContext.Current.Session["consumerSecret"] = consumerSecret;
HttpContext.Current.Session["oauthLink"] = OAUTH_URL;
//
IOAuthSession session = CreateSession();
IToken requestToken = session.GetRequestToken();
SAMPLE OBJECT
{
"Payment": {
"CustomerRef": {
"value": "20",
"name": "Red Rock Diner"
},
"DepositToAccountRef": {
"value": "4"
},
<script src="https://js.appcenter.intuit.com/Content/IA/intuit.ipp.anywhere-1.3.2.js" type="text/javascript"></script>
<script type="text/javascript">
intuit.ipp.anywhere.setup({
grantUrl: 'http://www.mycompany.com/HelloWorld/RequestTokenServlet'
datasources: {
quickbooks : true,
payments : true
},
paymentOptions:{
intuitReferred : true
<script src="https://js.appcenter.intuit.com/Content/IA/intuit.ipp.anywhere-1.3.2.js" type="text/javascript"></script>
<script type="text/javascript">
intuit.ipp.anywhere.setup({
grantUrl: 'http://www.mycompany.com/HelloWorld/RequestTokenServlet'
datasources: {
quickbooks : true,
payments : true
},
paymentOptions:{
intuitReferred : true
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2015-06-09T05:37:09.563-07:00">
<Customer domain="QBO" sparse="false">
<Id>68</Id>
<SyncToken>0</SyncToken>
<MetaData>
<CreateTime>2015-06-09T05:37:09-07:00</CreateTime>
<LastUpdatedTime>2015-06-09T05:37:09-07:00</LastUpdatedTime>
</MetaData>
<Title>Mr</Title>
<GivenName>James</GivenName>
var openid_identifier = ConfigurationManager.AppSettings["openid_identifier"];
var returnUrl = "OpenIdHandler.aspx";
var response = openid.GetResponse();
if (response == null)
{
// Stage 2: user submitting Identifier
Identifier id;
if (Identifier.TryParse(openid_identifier, out id))
{
try
package com.poc.oauth;
/**
* Created by Manas Mukherjee on 12/8/2014.
* Intuit Developer Group
*/
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
public class OAuthTest {
public static final Logger LOG = Logger.getLogger(OAuthTest.class);
public static final String REQUEST_TOKEN_URL = "https://oauth.intuit.com/oauth/v1/get_request_token";
public static final String ACCESS_TOKEN_URL = "https://oauth.intuit.com/oauth/v1/get_access_token";
public static final String AUTHORIZE_URL = "https://appcenter.intuit.com/connect/begin";