Each of the signing libraries for the OPEN APIs uses a configuration file for credential storage.
By default this is an
.edgerc file in your home directory.
If you are interested in creating this file manually, you can see the section on .edgerc format below.
During the Authorize Your Client process, you will have created an export file for use during this step.
The following steps will help you turn that into a properly formatted credential configuration file.
Using the gen_edgerc.py Script
You should already be in the correct directory which is /opt/examples/python
Once the script has started
- Open the file that was downloaded.
- Select All to get all credential information.
- Paste the contents onto the command line.
- Hit return.
- Hit Ctrl-D to complete the script.
Local Install Instructions
Use the terminal or
gitshell instance you used to Setup Your Environment, which will put you in the correct directory.
python gen_edgerc.py -f <filename>
This will create a new
default section within your
.edgerc file and you’ll be ready to move forward to the next step.
Verifying the Credentials
If you want to verify that the credentials have been created correctly, you can run the following script:
$ python verify_creds.py
Here is the format for the credentials file, in case you want to create it yourself. If you have used the new authentication mechanism, the file you downloaded
will only need a section name added. Here are the details for each section in
[default] host = <Base hostname without the scheme> client_token = <Client token> client_secret = <Secret> access_token = <Access Token>
Your file should resemble this:
[default] host = akaa-xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx.luna.akamaiapis.net client_token = akab-xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx client_secret = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx access_token = akab-xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx
Save the new file in your home (
~) directory with the name .edgerc (making sure to include the
. in front of the filename).
The [default] tag identifies the following set of credentials for access by scripts and other commands.