MCPcopy Create free account
hub / github.com/evolution-foundation/evolution-api / create

Method create

src/api/provider/sessions.ts:48–67  ·  view source on GitHub ↗
(instance: string)

Source from the content-addressed store, hash-verified

46 }
47
48 public async create(instance: string): ResponseProvider {
49 try {
50 const response = await axios.post(
51 `${this.baseUrl}`,
52 {
53 instance,
54 },
55 { headers: { apikey: this.globalApiToken } },
56 );
57 return [{ status: response.status, data: response?.data }];
58 } catch (error) {
59 return [
60 {
61 status: error?.response?.status,
62 data: error?.response?.data,
63 },
64 error,
65 ];
66 }
67 }
68
69 public async write(instance: string, key: string, data: any): ResponseProvider {
70 try {

Callers 10

bootstrapFunction · 0.45
saveKeyFunction · 0.45
authStateProviderMethod · 0.45
saveOnWhatsappCacheFunction · 0.45
createInstanceMethod · 0.45
createProxyMethod · 0.45
createTemplateMethod · 0.45
createSettingsMethod · 0.45

Calls 1

postMethod · 0.80

Tested by

no test coverage detected