The background interface of "apifm" can only be called after the administrator logs in. The interface request header needs to pass the x-token parameter, as shown in the figure:

The x-token needs to be obtained after the administrator logs in, but the x-token has a validity period, so the login interface needs to be called regularly to update the x-token, which is quite troublesome.
In order to make it easier for you to call the backend interface on the server, you can use Basic Authentication to call the backend interface:
#①View the backend merchant number and key

If the merchant number here is: 12345678
If the merchant key here is: abcdefghijklmnopqrstuvwxyz
#②GenerateAuthenticateString
1. Enter the merchant number and key above with **colon in english**Spliced together, for example:
12345678:abcdefghijklmnopqrstuvwxyzThe English colon in the middle cannot be missed! ! !
The English colon in the middle cannot be missed! ! !
The English colon in the middle cannot be missed! ! !2. Base64 encode the above string:
There are some online base64 conversion websites you can use:
[https://base64.us/](https://base64.us/)
[http://tool.chinaz.com/tools/imgtobase/](http://tool.chinaz.com/tools/imgtobase/)
[https://www.sojson.com/base64.html](https://www.sojson.com/base64.html)
[http://tools.bugscaner.com/base64/](http://tools.bugscaner.com/base64/)
[https://www.matools.com/base64](https://www.matools.com/base64)
[https://www.bejson.com/ui/image2base64/](https://www.bejson.com/ui/image2base64/)
As shown in the figure:

3. Get encoding key: **MTIzNDU2Nzg6YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo=**
# ③ Call interfaceChange the x-token of the request header to Authorization
The content is **Basic MTIzNDU2Nzg6YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo=**
****
**"Basic" Don't miss this one! ! !**
**"Basic" Don't miss this one! ! !**
**"Basic" Don't miss this one! ! !**
****
**As shown below:**
****
