Please help me. I don't know what I am doing wrong.
Best answer by Anonymous
When making a post request, you might want to make sure the content type in the header is set to `application/x-www-form-urlencoded` and you are URL encoding the value for `urn:ietf:params:oauth:grant-type:jwt-bearer` properly.
The PHP SDK comes with jwt support so the easiest way would be to leverage that and let the SDK do this for you.
All you need to do is use the login function and pass your jwt token to it:
$platform->login(['jwt' => 'Your JWT Token Here']);
* Make sure that the JWT token you are using is generated for the correct environment (sandbox/production)
* Make sure your PHP SDK is updated to at least version 2.3.0
Kindly accept the solution if you find this useful so that others can benefit from the same.
Cheers!
When making a post request, you might want to make sure the content type in the header is set to `application/x-www-form-urlencoded` and you are URL encoding the value for `urn:ietf:params:oauth:grant-type:jwt-bearer` properly.
The PHP SDK comes with jwt support so the easiest way would be to leverage that and let the SDK do this for you.
All you need to do is use the login function and pass your jwt token to it:
$platform->login(['jwt' => 'Your JWT Token Here']);
* Make sure that the JWT token you are using is generated for the correct environment (sandbox/production)
* Make sure your PHP SDK is updated to at least version 2.3.0
Kindly accept the solution if you find this useful so that others can benefit from the same.
Cheers!
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.