cURL for c:license

Trying to get a readout of about license but it keeps failing, probably due to lack och knowledge…

Can anyone fill in the blanks?
This is the curl I try:

curl --request POST
–url https://domain/coauthoring/CommandService.ashx
–data ‘{“token”:“JWT-TOKEN”,“c”:“license”}’

Hello @iamjackscereal, I am sending this request and get a correct result:

curl -X POST --location 'https://my_document_server/coauthoring/commandservice.ashx' \
--header 'Content-Type: application/json' \
--data '{"token": "my_token"}'

The payload of the token is

{
"c": "license"
}

Just get error 6 from the first, running it from Linux CLI.

Where do I submit the payload?

Please provide the whole request including the token so I could check where the error is.

Cant do that on a public forum. Perhaps you could state the exact command with payload included?

You can send the info to me via personal messages on this forum.

There are no PM functions to be found for me.
Can you activate it?

Hello @iamjackscereal

I have increased your trust level on this forum. Please see if personal message are available now.

For anyone who also suffers from {"error":6} response, look if you have JWT enabled. If so, you need to add JWT token to the request as well.

This JWT token works for me (just add signature with your secret):

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjIjoibGljZW5zZSJ9

Header:

{
  "alg": "HS256",
  "typ": "JWT"
}

Payload:

{
  "c": "license"
}

You can than pass only the token to coauthoring/CommandService.ashx without the need to add ?c=license (e.g. coauthoring/CommandService.ashx?token=<jwt_token> )

1 Like