SoFunction
Updated on 2025-04-10

Notes on PHP Sesame Credit Access

The SDK downloaded by Sesame is not able to run. After searching on Baidu, I didn’t find too many articles. There is only one article written by a CSDN blog, which is more valuable for reference.

Check the documents in detail + how many days to test and sort out the following points:

To access the Sesame API interface, it should be divided into 2 steps:

The first step is to obtain authorization. This is the official SDK. As long as the parameters are configured correctly, it can be operated. Pay attention to the following parameters, and compare them with Sesame Document.

The most important point is, Sesame public key generation and modification. The generated public key is copied into the Sesame background according to the official operation. After saving, Sesame will generate a new public key. Click Copy, save it to our public key file, and then upload it to the space for PHP to call.

$request->setScene("test"); 
$request->setChannel("apppc");
$request->setPlatform("zmop");
$request->setIdentityType("2");// Required parameters// Construct the authorized business registration number, name, and document type; "Description of business registration identity_param in Chapter 4"$request->setIdentityParam("{\"certNo\":\"$certNo\",\"certType\":\"IDENTITY_CARD\", \"name\":\"$name\"}"); 
// $request->setIdentityParam("{\"certNo\":\"$certNo\",\"certType\":\"IDENTITY_CARD\", \"name\":\"$name\",\"mobileNo\":\"$mobile\"}"); 
// Construct the service parameter expansion parameters "Business parameter description in Chapter 4 biz_params"$request->setBizParams("{\"auth_code\":\"M_H5\",\"channelType\":\"app\",\"state\":\"$uid\"}");//

After the authorization is successful, it will jump to the callback address we set. This callback address has a param parameter. It must be decrypted using the decryption function in the SDK. After decryption, the client's OPENI_ID can be obtained.

OK, after getting this OPEN_ID, save it to the database and the authorization is completed.

Step 2,

Based on the authorized OPEN_ID, you can get sesame points. The example in this SDK can run. . .

The most important thing is the first point.

The above are the precautions for PHP Sesame Credit Access that the editor introduced to you. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support for my website!