Account: Reset Authentication Key

Collapse All

Description

Generates and returns a new key, overwriting the old one. Use this only when you are specifically trying to change an existing key.

URL

https://api.fonts.com/rest/{format}/Accounts/

{format}

xml or json

Method

GET

Required Header Parameters:

  • AppKey Your application’s key
  • Password Account password

Required Query String Parameters:

  • wfsemailAddress used to create the account

Optional Query String Parameters:

  • none

Response variables:

  • MessageIf the response is successful then the “message” parameter of the response will be “Success” and if there is some error or failure then the “message” parameter will be the error message.
  • Account: AuthorizationKeyToken used for subsequent authentication of messages. See Developer's Page for details.

Sample Code

PHP

<?php

require_once('Services_WFS.php');

$services = new Services_WFS;
$apiKey = '';
$services->setCredentials(null, null, $apiKey);

$email = '';
$password = '';
var_dump($services->getAccountAuthenticationKey($email, $password));
?>        

C#

     
private string GenerateToken(string emailAddress, string pass)
    {
      const string method = "GET";
      string requestUri = "/rest/" + Format + "/Accounts/" +
                                      "?wfsemail=" + emailAddress;

      //See common functions 
      return GetResponseSecure(method, requestUri, pass);

    }      

VB.NET

   
Private Function GenerateToken(ByVal emailAddress As String, ByVal pass As String) As String

    Const method As String = "GET"
    Dim requestUri As String = "/rest/" & Format & "/Accounts/" & _
                               "?wfsemail=" & emailAddress

    'See common functions for GetResponse
    Return GetResponseSecure(method, requestUri, pass)

End Function      

XML Response

<Accounts>
  <Message>Success</Message>
  <Account>
    <AuthorizationKey>f160cc8a-d146-40ac-b81b-995f2acae6b3--542b18c0-61ca-4b5d-8eeb-af4cbca9df1bCD-AE-B1-28-2D-61-47-72-BE-B1-E7-4C-19-2B-EB-DA</AuthorizationKey>
  </Account>
</Accounts>      

Json Response

{
   "Accounts":{
      "Account":{
         "AuthorizationKey":"f160cc8a-d146-40ac-b81b-995f2acae6b3--542b18c0-61ca-4b5d-8eeb-af4cbca9df1bCD-AE-B1-28-2D-61-47-72-BE-B1-E7-4C-19-2B-EB-DA"
      },
      "Message":"Success"
   }
}