Solace Cloud REST API authentication
I have created an api token in my Solace Cloud account but when calling the below URL with postman/curl I am getting an authorization error. Am I missing something that I need to be doing?
https://api.solace.cloud/api/v0/services/{service-id}?apiToken={api-token}
Thanks,
Pete
Comments
-
Hi @petegehrman,
I believe the issue is that the API expects the token specified as a header likeAuthorization: Bearer <Your New Token>
Can you try this and see if it works for you?
curl -X GET https://api.solace.cloud/api/v0/services -H "Authorization: Bearer <YOUR TOKEN>"
From there you should be able to get your service ID and then query it directly.
0 -
Thanks @marc, that worked I didn't see that anywhere in the documentation.
1 -
@petegehrman Glad it worked. And thanks for the feedback! I'll take a closer look at the docs.
0