About Tencent cloud PHP's "Request Signature Signature" stepped pit

Signature error:

The provided credentials could not be validated. Please check your signature is correct。

The foregoing quote:

Do live project, if you use Tencent cloud cloud video service, then, as the back end, whether it is PHP, Java, Python, you certainly will be exposed to a "get to live among state interface" that [Live View the stream]. Because the state is not your library is stored on live, that live in it, not in real time, you need to obtain what is being broadcast live between requests from Tencent cloud over there, and then update to live among your own table. This interface returns a list that contains all being broadcast live streaming. 

[View] live streams in 
the document address: https: //cloud.tencent.com/document/product/267/20472

Tucao text:

Into this document, you will see that the request parameter and returns the result, and examples. As a normal external document, which is the basic configuration, but, but, as we saw when the request parameters, do not produce a doubt from the ground will be shown:

See these words, how you think, is this only a few parameters shown above, or is it, have to add all of the common parameters? Note [1] circle diagram red word "only lists the parameters and parameters of interface requests of some public", which "only", the word used is really interesting, in the end, to use this so-called "following requests parameters ", or, you have to add all of the common parameters, and or, just add" these common parameters input parameter "show? Very clear! 

You say you or to list them all, makes one understand, or say clearly, with which a few, Buffett's what the whole groggy, people guess, you know, you are faced with hundreds of millions of users ah, on this "expression" level, but also dare to take on the "table", how many people behind you greetings ancestors, you know? You are with your junior sister apprentice to learn the language of it, the whole of hazy, love it? ! 

See this, surely someone will click on [public request Parameters few blue words, into the functional parameters page: 
https://cloud.tencent.com/document/api/267/20459 

into this page, you will see the signature method V3 [], [] V1 signature method two big title, if, newcomers to those who, at first glance, it confused, which I use, this is a clear place, and, text first, you did not give explanation, these two headlines usage scenarios. I am not hypocritical, I think as Tencent such a big platform, you write something, it should be easy to understand, clear and concise, otherwise, is Ma Ying-jeou to lose face! 

This is not what comes in and control the first few "part of the function parameters", but also determine the method should be [front] V1 corresponding to a lot of "parameters." 

However, the following, you have to pay attention:

"Request signature", this parameter is, however, essential that all requests Tencent cloud-related stuff, this is not the equivalent of the keys to the warehouse did not! 

If you ignore, that the words "specific calculation method, see" later, but, hastily, to search "signature method", you may be found to this address: 
https://cloud.tencent.com/document/ product / 267/4709

Signature Algorithm, Hey, this is not you, you can still see the words "Signature", and if you keep reading, you will like the "Young Justice Bao" that well in the wild bamboo forests of no return, the more go the farther to flee the more I do not know where to go, and finally, you will see that it becomes a special horror story! [Behind his]

Yes, this is a pit! This document is not! ! ! [Behind his] 

should be noted that the words "specific calculation method, see" Post: "Interface authentication documents." This in? See here, a lot of people might be confused, for the hair here without a "blue jump word connection"? For the hair, I want to greet your ancestors, and wrote that "hidden" documents! Children never finish the job all know how to stay up late, you can be lazy how special it it? Ah, you know, this one on your lazy, depriving Ma Ying-jeou was scolded how many developers? People are veterans, you have to carry you the pot, then what? ! Hey, yes, "micro-channel pay," the document, is not especially what you wrote? ! ! [Machetes]

Looked at the shining of a few characters, you can not "freak"? Yes, I saw the "cloud Live API2017" a few characters, but I know that it is gross? ! 

Perhaps you will find the "Interface Authentication," but you might, "Hey, how back there two?" This is without "blue link the word" consequences, to know why people will criticize you also write the "hidden" document, you are a SB.

People look for him thousands of Baidu, really want to beat you hack! Yes, finally met to find, see below: 
https://cloud.tencent.com/document/api/267/20460

Note that this figure is not "met four" mean? Yes, there is a front, stickers, and compare:

True and false Monkey King, you say pit pit! ! [Behind his] 

are people I do not know what to say, with the maze-like, hand outstretched, resulting in two, like hell in general, yes, that's the reason why the horror stories.

problem causes:
 

PHP siege lion, using http_build_query () function, you must remember encoding RFC3986, otherwise, the signature will be given!
Remember! ! However, the best, or use stitching, less error:
The other, did not have anything, yes, pull down, there are eggs (codes)! In fact, this thing is very simple, but that is because the lazy prostitution, a lot of people angry about! Well, to this bar, do not say! 

The END! 2020/3/22 01:36
 
Published 59 original articles · won praise 2 · Views 5559

Guess you like

Origin blog.csdn.net/LDR1109/article/details/105210412
Recommended