Skip to main content
All CollectionsAPI
How to enable SalesWings API access?
How to enable SalesWings API access?

Would you like to leverage our API in order to achieve your use cases? Please read the guide below to understand how the enablement works.

Salah from SalesWings avatar
Written by Salah from SalesWings
Updated over a year ago

I/ Obtaining an API Token

The API token can be generated on the Settings page under the SalesWings API section.

II/ Authorizing API Calls

Once you have the token, you can access the API methods.

In order to call any method, you need to provide the API token with the Bearer Authorization.

An example request might look like this:

1 curl -X 'GET' \ 
2 'https://helium.saleswings.pro/api/core/project/account' \
3 -H 'accept: application/json' \
4 -H 'Authorization: Bearer $YOUR_API_TOKEN'

III/ API Documentation

You can explore the API documentation available in the OpenAPI format here. The documentation lists all the available endpoints, describes required parameters and method output, and provides request and response examples.

If you click the Authorize button seen on the screenshot above, a dialog will prompt you for the API token.

If you paste your API token and click Authorize, you will be able to make the calls to the API methods from the OpenAPI UI:

IV/ Authorizing with Cockpit Login and Password for Testing

If a member of your team does not have access to the API token, it’s possible to use the special POST /auth method to generate a temporary token.

1 curl -X 'POST' \ 
2 'https://helium.saleswings.pro/api/core/auth' \
3 -H 'accept: application/json' \
4 -H 'Content-Type: application/json' \
5 -d '{
6 "username": "$COCKPIT_USERNAME",
7 "password": "$COCKPIT_PASSWORD"
8}'

The endpoint will return a temporary token for you:

1{ 
2 "token": "b9926dda101767f9af9ad72471e9b12dfd3e4cd7806",
3 "expiresOn": "2022-22-10T12:22:20Z",
4 "apiUrl": "https://helium.saleswings.pro/"
5}

You can use the returned token instead of your permanent API token, but we recommend restricting its usage only to the OpenAPI UI for testing purposes.

We sure hope this was helpful, and always appreciate feedback!

Kindly send us an email here if you need help with the setup: support@saleswingsapp.com

Did this answer your question?