“sign verification failed” while sending API to /v2/user/oauth/token with the code

Facing trouble when sending post request to " /v2/user/oauth/login"
** Edited : should be " /v2/user/oauth/token"

I am confident with my signature because it’s validated through oauth link. But not sure why it’s not working.

Thanks in advance!

Reason for the problem:

The signature content used on the authorization login page of OAuth2.0: {clientId}_{seq}

Signature content used when calling the regular v2 interface: complete body parameter (in JSON string format)

Please check the document,Specific link address: 酷宅开放平台 4.3

2 Likes

Dear Liu,

Thanks for reply.

So sorry for misleading content just now, I was referring to “/v2/user/oauth/token”. The signature content works for my authorization login page of OAuth2.0.

But when I send a post request with the code to “/v2/user/oauth/token”, I faced error with “sign verification failed”.

Once again, thanks for your reply. Just to confirm my understanding

Should I encrypt

{ "email": "1234@gmail.com", "password": "12345678", "countryCode": "+1" }

this to be my signature instead of {clientId}_{seq} for my “/v2/user/oauth/token”?

Cuz this sounds like user will need to sign up twice, once at oauth page, one at our backend system for the signature.

Appreciated Your Time.

Solved it, thanks jiale!!

Basically, encrypt the entire json body message of the request as the sign… :rofl:

Hi there,

I am experiencing the same issue when trying to authenticate on the initial popup. Is this problem related to the first authorization parameter or to the authentication header from the 2nd call(/user/oauth/token)?

Thanks!

Please refer to the document to correctly set up the signature

1 Like

Ok so is the problem related to the first authorization parameter or to the authentication header from the 2nd call(/user/oauth/token)? I assume first, right?

@jiale.liu ??

The signature algorithm in the authorization page URL is the same as that in interfaces such as v2 login, but the messages are different. Please carefully distinguish between them by reviewing the documentation.