05-12-2022 12:51 AM
Hi:
I receive
`eyJhbGciOiAiZGlyIiwgImtpZCI6ICJrbXM6Ly9rbXMtdXMud2J4Mi5jb20va2V5cy83YzRlNmM5Ny1jMzAyLTQzYzMtYmE5MS1iZDk2NTBmNzRkOTEiLCAiZW5jIjogIkEyNTZHQ00ifQ..v3iME44EPvhov37q.CIXlzg.tXHjceO6JTAn1cNoHSVhG` from websocket,
{ "alg": "dir", "kid": "kms://kms-us.wbx2.com/keys/7c4e6c97-c302-43c3-ba91-bd9650f74d91", "enc": "A256GCM" }
05-12-2022 12:52 AM
This is the Tracking ID
ROUTER_627CBACF-E06E-01BB-4266-0AFE58B64266
05-12-2022 01:49 AM - edited 05-12-2022 01:53 AM
It's not clear exactly what you're issue is, can you give a brief description of what you're doing?
I checked the trackingId and found a POST to https://webexapis.com/v1/messages , which seems to fail with a 502 error, is this what you're reporting?
Did you use that JWT as the token to make this request with?
If yes, please note that JWTs cannot be used with our APIs. They need to be exchanged for an access token, see here: https://developer.webex.com/docs/guest-issuer#:~:text=Exchanging%20for%20an%20Access%20Token . Once you have exchanged it, you need to ensure the guest user is added to the room where you want to send the message. You would do this with the /create-a-membership API but first you need to get the personId of this guest user, using the /get-my-own-details people API .
If your issue is something else, please provide steps on how you reproduced it. Also provide details on the websocket you're using, how it's created and so on.
05-12-2022 01:53 AM
I have created a bot, and only one of my colleague's messages is a JWT token others are normal messages.
05-12-2022 02:06 AM
Ok, it's not really clear to me what you mean by that. What do you mean when you say 'one of my colleagues messages is a JWT token' .. Do you mean that one of your colleagues uses a JWT token to create messages or do you mean that the message itself is a JWT token... or something else?
I also don't understand what you mean when you say 'other messages are normal'.
I Think it would be best if you explain what the full flow of events is, as in what you are doing exactly and what's being used. If you can provide this in step by step form that would help.
05-12-2022 04:12 AM
a
{ "id": "0d139e49-fd0c-4c4c-8804-c3b436a4a930", "data": { "activity": { "id": "53ca6cd0-d1df-11ec-81a1-ebf6ac2a1e16", "objectType": "activity", "url": "https://conv-a.wbx2.com/conversation/api/v1/activities/53ca6cd0-d1df-11ec-81a1-ebf6ac2a1e16", "published": "2022-05-12T10:36:05.533Z", "verb": "post", "actor": { "id": "nam.n@binance.com", "objectType": "person", "displayName": "Nam Nguyen (Infra Tech - UTC+7)", "orgId": "25ae0134-b107-42fd-8c63-f776f2300739", "emailAddress": "nam.n@binance.com", "entryUUID": "0285679a-b824-49ef-8715-530f8cb54e85", "type": "PERSON" }, "object": { "objectType": "comment", "displayName": "eyJhbGciOiAiZGlyIiwgImtpZCI6ICJrbXM6Ly9rbXMtdXMud2J4Mi5jb20va2V5cy83YzRlNmM5Ny1jMzAyLTQzYzMtYmE5MS1iZDk2NTBmNzRkOTEiLCAiZW5jIjogIkEyNTZHQ00ifQ..RoE4yaMuQ23TAQAl.Mb6WIA.p9CwTeN8ML_ArmsPGcCJig" }, "target": { "id": "6a1c5450-d1b5-11ec-892f-25f67c216e5e", "objectType": "conversation", "url": "https://conv-a.wbx2.com/conversation/api/v1/conversations/6a1c5450-d1b5-11ec-892f-25f67c216e5e", "published": "2022-05-12T05:36:04.117Z", "participants": { "items": [] }, "activities": { "items": [] }, "deletedActivityIds": [], "tags": [ "ONE_ON_ONE" ], "globalId": "Y2lzY29zcGFyazovL3VzL1JPT00vNmExYzU0NTAtZDFiNS0xMWVjLTg5MmYtMjVmNjdjMjE2ZTVl" }, "clientTempId": "1968c6a2-3391-41e2-8a9b-408d77fea519", "encryptionKeyUrl": "kms://kms-us.wbx2.com/keys/7c4e6c97-c302-43c3-ba91-bd9650f74d91", "vectorCounters": { "sourceDC": "a-", "counters": { "a-": 27 } } }, "eventType": "conversation.activity" }, "timestamp": 1652351765569, "trackingId": "CLIENT_fbb57891-3a39-4268-b3de-0f14f952a475", "alertType": "full", "headers": { "data.activity.target.lastReadableActivityDate": "2022-05-12T10:36:05.533Z", "data.activity.target.owningOrg": "25ae0134-b107-42fd-8c63-f776f2300739" }, "sequenceNumber": 918, "filterMessage": false }
05-12-2022 04:14 AM
If you see from the above json payload I receive from your WebSocket, you'll see the displayName is
eyJhbGciOiAiZGlyIiwgImtpZCI6ICJrbXM6Ly9rbXMtdXMud2J4Mi5jb20va2V5cy83YzRlNmM5Ny1jMzAyLTQzYzMtYmE5MS1iZDk2NTBmNzRkOTEiLCAiZW5jIjogIkEyNTZHQ00ifQ..RoE4yaMuQ23TAQAl.Mb6WIA.p9CwTeN8ML_ArmsPGcCJig
05-12-2022 04:24 AM
So, I use data.activity.id combine it into: ciscospark://us/MESSAGE/53ca6cd0-d1df-11ec-81a1-ebf6ac2a1e16, and base64 it to call the api
/v1/messages/Y2lzY29zcGFyazovL3VzL01FU1NBR0UvNTNjYTZjZDAtZDFkZi0xMWVjLTgxYTEtZWJmNmFjMmExZTE2
it return me the
eyJhbGciOiAiZGlyIiwgImtpZCI6ICJrbXM6Ly9rbXMtdXMud2J4Mi5jb20va2V5cy83YzRlNmM5Ny1jMzAyLTQzYzMtYmE5MS1iZDk2NTBmNzRkOTEiLCAiZW5jIjogIkEyNTZHQ00ifQ..RoE4yaMuQ23TAQAl.Mb6WIA.p9CwTeN8ML_ArmsPGcCJig
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide