{"id":6315,"date":"2025-07-03T11:38:39","date_gmt":"2025-07-03T11:38:39","guid":{"rendered":"https:\/\/support.alfaview.com\/?page_id=6315"},"modified":"2025-07-03T11:42:07","modified_gmt":"2025-07-03T11:42:07","slug":"initial-authentication-with-api-key","status":"publish","type":"page","link":"https:\/\/cp-prod-wordpress.alfa.sx\/de\/developers\/request-your-api-credentials\/usage-examples\/initial-authentication-with-api-key\/","title":{"rendered":"Erstauthentifizierung mit API Key"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"summary\">Summary<a href=\"#summary\" class=\"av-heading-anchor\"><i class=\"bi bi-link\"><\/i><\/a><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Creates an access token which can be used throughout the process<\/li>\n\n\n\n<li><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\"><code>companyId<\/code><\/mark> is required<\/li>\n\n\n\n<li>Required API calls: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\"><code>authenticationService\/authenticate<\/code><\/mark><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"request\">Request<a href=\"#request\" class=\"av-heading-anchor\"><i class=\"bi bi-link\"><\/i><\/a><\/h2>\n\n\n\n<p>Request <button class=\"av-button av-button--error\">POST<\/button> to <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\"><code>https:\/\/apis.alfaview.com\/json\/v1\/authenticationService\/authenticate<\/code><\/mark><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"requestId\": \"### REQUEST ID ###\",\n  \"authorizationCodeCredentials\": {\n  \"clientId\": \"### API KEY ALIAS ###\",\n  \"code\": \"### API KEY SECRET ###\",\n  \"companyId\": \"### COMPANY ID ###\"\n  }\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"response\">Response<a href=\"#response\" class=\"av-heading-anchor\"><i class=\"bi bi-link\"><\/i><\/a><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  ...\n  \"accessToken\": \"...\",\n  \"expiresAt\": \"...\",\n  ...\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"notes\">Notes<a href=\"#notes\" class=\"av-heading-anchor\"><i class=\"bi bi-link\"><\/i><\/a><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Store the access token for subsequent requests<\/li>\n\n\n\n<li>Remember to re-authenticate before <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\"><code>expiresAt<\/code><\/mark> timestamp, or you will receive an error that the token has expired<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Summary Creates an access token which can be used throughout the process companyId is required Required API calls: authenticationService\/authenticate Request Request POST to https:\/\/apis.alfaview.com\/json\/v1\/authenticationService\/authenticate Response Notes Store the access token for subsequent requests Remember to [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"parent":3170,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-6315","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/cp-prod-wordpress.alfa.sx\/de\/wp-json\/wp\/v2\/pages\/6315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cp-prod-wordpress.alfa.sx\/de\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cp-prod-wordpress.alfa.sx\/de\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cp-prod-wordpress.alfa.sx\/de\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/cp-prod-wordpress.alfa.sx\/de\/wp-json\/wp\/v2\/comments?post=6315"}],"version-history":[{"count":1,"href":"https:\/\/cp-prod-wordpress.alfa.sx\/de\/wp-json\/wp\/v2\/pages\/6315\/revisions"}],"predecessor-version":[{"id":6316,"href":"https:\/\/cp-prod-wordpress.alfa.sx\/de\/wp-json\/wp\/v2\/pages\/6315\/revisions\/6316"}],"up":[{"embeddable":true,"href":"https:\/\/cp-prod-wordpress.alfa.sx\/de\/wp-json\/wp\/v2\/pages\/3170"}],"wp:attachment":[{"href":"https:\/\/cp-prod-wordpress.alfa.sx\/de\/wp-json\/wp\/v2\/media?parent=6315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}