APIdeck,API call Vault URL that Messtone forward to a consumer to connect integrations; curl –request POST\–url ‘https://unify.apideck.com/vault/session’\–header ‘Authorization:Bearer{API_KEY}’\–header ‘x-apideck-app-id:{APP_ID}’\–header ‘x-apideck-consumer-id:{CONSUMER_ID}’\–data-raw ‘{“redirect_uri”:”https://mysaas.com/dashboard”,”consumer_metadata”:{“account_nameMesstone”:”SpaceX”,”user_namerharper@messtone”:”Elon Musk”,”image”:”https://www.spacex.com/elon.jpg”},”theme”:{“vault_nameMesstone”:”Space X”,”primary_color”:”#286efa”,”sidepanel_text_color”:”FFFFFF”,}}’First API call APIdeck API.Example curl to the CRM API to get Messtone startedcurl --request GET\--url 'https://unify.apideck.com/crm/companies'\--header 'Authorization:Bearer{API_KEY}'\--header 'x-apideck-app-id:{API_ID}'\--header 'x-apideck-consumer-id:test-consumer'\--header 'x-apideck-service-id:{SERVICE_ID}' Install npm install @apideck/node Getting startedconst {APIdeck}=require('@apideck/node'const APIdeck=new APIdeck({apiKey:'sk_live_8ade639d-152a-41df-a958-70b963bcde65-7Fdz9war8CQCNqyC1uW-275f038b-351d-4634-9217-c5f899ac9b4f',apiId: '3KZs7XKRUc8fa4pn1uVVtlDjPOsBN16o1uV',consumerId:'<insert-consumer-id>'})const response=await APIdeck.crm.contactsAll({serviceId: 'salesforce',//optional limit:10}) NPM Example: retrieving a list of all contacts and updating the first record with a new address as follows`import APIdeck,{PhoneNumberType}from ‘@apideck/node’;const apideck=new APIdeck({apiKey: ‘<insert-api-key-here>’,appId: ‘<insert-application-id-here>’,consumerId: ‘<insert-consumer-id-here>’})const{crm}=apideck //Declare Unify API to use const{crm}=apideck //Override consumerId serviceId as declared in initial configuration for this operation.const response=await crm.contactsAll({//serviceId: ‘salesforce’,//optional limit:’10’})

Leave a comment