requestApiKey
Syntax
requestApiKey( permissions, return_url, cancel_url='',
site_url='', comment='')
Only used for the
interactive creation of an API key. The function makes a request for a new API key. Your application must
save the request token and direct the user to the request URL. When the
users returns, your application receives the API key via the
retrieveApiKey()
with the request token.
Access rights
Development key required.
Arguments
permissions – the rights of the new key: “read-only” or “writable”
return_url – the user is led back to this URL if they have created an API key. You may use TOKEN (with two underscores at beginning and end) for a placeholder for the request token.
cancel_url (optional) – The user is led back to this URL if they cancel the API key creation. If not specified, they will be led back to the “return_url”.
site_url (optional) – This URL is stored with the key as a website in use. The domain of the application URL is used by default. If specified, the application URL must begin with this URL. This way, it is possible to specify a subdirectory of the application URL – if e.g. a member area has been installed on https://www.domäne.com/members.
comment – an optional comment that is deposited with the new API key
Return data
request_url: Direct the user to this URL so they can create the key there.
request_token: Save this token. When the user returns (to the “return_url” page), you can use the retrieveApiKey() function to get the API key.