-
Notifications
You must be signed in to change notification settings - Fork 1
Authentication tokens
Ilya Krukowski edited this page Apr 10, 2022
·
2 revisions
Use this endpoint to generate a JWT token. Please note that:
- This token is required only if you are going to create, update, or delete resources via the API. JWT token is not needed to read data.
- You must have an account at rating.chgk.info to generate a JWT token.
Provide your email and password:
response = client.authentication_token email: 'CHGK_EMAIL', password: 'CHGK_PASSWORD'
Now you can fetch your token:
token = response.token
Use the newly generated token when initializing the client:
client = RatingChgkV2.client token: response.token
Now perform the API requests as usual:
custom_client.create_country name: 'Название страны'