Authenticating my GraphQL API Request
In order to execute GraphQL calls from any environment, you must ensure proper authentication. This is done by ensuring the http header of your request contains two necessary headers:
Authorization
: Bearer {token}
The {token} is your API-key- see this resource for information on managing/creating valid API keys
x-org
: {subdomain}
The {subdomain} is the subdomain portion of the URL you use to access Enerflo v2. For example, if my URL ishttps:xyzsolarcompany.enerflo.io/deals
, then my {subdomain} value isxyzsolarcompany
Sample cURL illustrating the presentation of the Bearer {token} and x-org {subdomain}
curl 'https://api.enerflo.io/graphql' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer yourapikeygoeshere.1234567890' \
-H 'x-org: xyzsolarcompany' \
--data-binary '{
"query": "query sampleQuery {\n me {\n fullName\n }\n}"
}' \
--compressed
Updated about 1 month ago